PD
momapy.sbgn.pd
Classes:
| Name | Description |
|---|---|
AndOperator |
Class for and operators |
AndOperatorLayout |
Class for and operator layouts |
Association |
Class for associations |
AssociationLayout |
Class for association layouts |
CardinalityLayout |
Class for cardinality layouts |
Catalysis |
Class for catalyses |
CatalysisLayout |
Class for catalysis layouts |
Compartment |
Class for compartments |
CompartmentLayout |
Class for compartment layouts |
Complex |
Class for complexes |
ComplexLayout |
Class for complex layouts |
ComplexMultimer |
Class for complex multimers |
ComplexMultimerLayout |
Class for complex multimer layouts |
ComplexMultimerSubunit |
Class for complex subunits |
ComplexMultimerSubunitLayout |
Class for complex multimer subunit layouts |
ComplexSubunit |
Class for complex subunits |
ComplexSubunitLayout |
Class for complex subunit layouts |
ConsumptionLayout |
Class for consumption layouts |
Dissociation |
Class for dissociations |
DissociationLayout |
Class for dissociation layouts |
EmptySet |
Class for empty sets |
EmptySetLayout |
Class for empty set layouts |
EntityPool |
Base class for entity pools |
EquivalenceArcLayout |
Class for equivalence arc layouts |
EquivalenceOperator |
Class for equivalence operators |
EquivalenceOperatorInput |
Class for inputs of equivalence operators |
EquivalenceOperatorLayout |
Class for equivalence operator layouts |
EquivalenceOperatorOutput |
Class for outputs of equivalence operators |
FluxRole |
Base class for flux roles |
GenericProcess |
Class for generic processes |
GenericProcessLayout |
Class for generic process layouts |
Inhibition |
Class for inhibitions |
InhibitionLayout |
Class for inhibition layouts |
LogicArcLayout |
Class for logic arc layouts |
LogicalOperator |
Class for logical operators |
LogicalOperatorInput |
Class for inputs of logical operators |
Macromolecule |
Class for macromolecules |
MacromoleculeLayout |
Class for macromolecule layouts |
MacromoleculeMultimer |
Class for macromolecule multimers |
MacromoleculeMultimerLayout |
Class for macromolecule multimer layouts |
MacromoleculeMultimerSubunit |
Class for macromolecule multimer subunits |
MacromoleculeMultimerSubunitLayout |
Class for macromolecule multimer subunit layouts |
MacromoleculeSubunit |
Class for macromolecule subunits |
MacromoleculeSubunitLayout |
Class for macromolecule subunit layouts |
Modulation |
Class for modulations |
ModulationLayout |
Class for modulation layouts |
Multimer |
Base class for multimers |
MultimerSubunit |
Base class for multimer subunits |
NecessaryStimulation |
Class for necessary stimulations |
NecessaryStimulationLayout |
Class for necessary stimulation layouts |
NotOperator |
Class for not operators |
NotOperatorLayout |
Class for not operator layouts |
NucleicAcidFeature |
Class for nucleic acid features |
NucleicAcidFeatureLayout |
Class for nucleic acid feature layouts |
NucleicAcidFeatureMultimer |
Class for nucleic acid feature multimers |
NucleicAcidFeatureMultimerLayout |
Class for nucleic acid feature multimer layouts |
NucleicAcidFeatureMultimerSubunit |
Class for nucleic acid feature multimer subunits |
NucleicAcidFeatureMultimerSubunitLayout |
Class for nucleic acid feature multimer subunit layouts |
NucleicAcidFeatureSubunit |
Class for nucleic acid feature subunits |
NucleicAcidFeatureSubunitLayout |
Class for nucleic acid feature subunit layouts |
OmittedProcess |
Class for omitted processes |
OmittedProcessLayout |
Class for omitted process layouts |
OrOperator |
Class for or operators |
OrOperatorLayout |
Class for or operator layouts |
PerturbingAgent |
Class for perturbing agents |
PerturbingAgentLayout |
Class for perturbing agent layouts |
Phenotype |
Class for phenotypes |
PhenotypeLayout |
Class for phenotype layouts |
Process |
Base class for processes |
Product |
Class for products |
ProductionLayout |
Class for production layouts |
Reactant |
Class for reactants |
SBGNPDLayout |
Class for SBGN-PD layouts |
SBGNPDMap |
Class for SBGN-PD maps |
SBGNPDModel |
Class for SBGN-PD models |
SimpleChemical |
Class for simple chemical |
SimpleChemicalLayout |
Class for simple chemical layouts |
SimpleChemicalMultimer |
Class for simple chemical multimers |
SimpleChemicalMultimerLayout |
Class for simple chemical multimer layouts |
SimpleChemicalMultimerSubunit |
Class for simple chemical multimer subunits |
SimpleChemicalMultimerSubunitLayout |
Class for simple chemical multimer subunit layouts |
SimpleChemicalSubunit |
Class for simple chemical subunits |
SimpleChemicalSubunitLayout |
Class for simple chemical subunit layouts |
StateVariable |
Class for state variables |
StateVariableLayout |
Class for state variable layouts |
Stimulation |
Class for stimulations |
StimulationLayout |
Class for stimulation layouts |
StoichiometricProcess |
Base class for stoichiometric processes |
Submap |
Class for submaps |
SubmapLayout |
Class for submap layouts |
Subunit |
Base class for subunits |
Tag |
Class for tags |
TagLayout |
Class for tag layouts |
TagReference |
Class for tag references |
Terminal |
Class for terminals |
TerminalLayout |
Class for terminal layouts |
TerminalReference |
Class for terminal references |
UncertainProcess |
Class for uncertain processes |
UncertainProcessLayout |
Class for uncertain process layouts |
UnitOfInformation |
Class for units of information |
UnitOfInformationLayout |
Class for unit of information layouts |
UnspecifiedEntity |
Class for unspecified entities |
UnspecifiedEntityLayout |
Class for unspecified entity layouts |
UnspecifiedEntitySubunit |
Class for unspecified entity subunits |
UnspecifiedEntitySubunitLayout |
Class for unspecified entity subunit layouts |
Attributes:
| Name | Type | Description |
|---|---|---|
SBGNPDLayoutBuilder |
Class for SBGN-PD layout builders |
|
SBGNPDMapBuilder |
Class for SBGN-PD map builders |
|
SBGNPDModelBuilder |
Class for SBGN-PD model builders |
AndOperator
dataclass
AndOperator(
*,
id_: str = get_uuid4_as_str(),
inputs: frozenset[LogicalOperatorInput] = frozenset()
)
Bases: LogicalOperator
Class for and operators
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'7d28b4d6-06c8-4352-9c1a-c68bca8a9f8c'
|
AndOperatorLayout
dataclass
AndOperatorLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 30.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 30.0,
direction: Direction = HORIZONTAL,
left_to_right: bool = True,
left_connector_length: float = 10.0,
right_connector_length: float = 10.0,
left_connector_stroke: (
NoneValueType | Color | None
) = None,
left_connector_stroke_width: float | None = None,
left_connector_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
left_connector_stroke_dashoffset: float | None = None,
left_connector_fill: (
NoneValueType | Color | None
) = None,
left_connector_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
left_connector_filter: (
NoneValueType | Filter | None
) = None,
right_connector_stroke: (
NoneValueType | Color | None
) = None,
right_connector_stroke_width: float | None = None,
right_connector_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
right_connector_stroke_dashoffset: float | None = None,
right_connector_fill: (
NoneValueType | Color | None
) = None,
right_connector_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
right_connector_filter: (
NoneValueType | Filter | None
) = None
)
Bases: _ConnectorsMixin, _SimpleMixin, _TextMixin, SBGNNode
Class for and operator layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'092140f1-d606-49ee-bf93-db3056701771'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
30.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
30.0
|
direction
|
Direction
|
|
<Direction.HORIZONTAL: 1>
|
left_to_right
|
bool
|
|
True
|
left_connector_length
|
float
|
|
10.0
|
right_connector_length
|
float
|
|
10.0
|
left_connector_stroke
|
NoneValueType | Color | None
|
|
None
|
left_connector_stroke_width
|
float | None
|
|
None
|
left_connector_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
|
None
|
left_connector_stroke_dashoffset
|
float | None
|
|
None
|
left_connector_fill
|
NoneValueType | Color | None
|
|
None
|
left_connector_transform
|
NoneValueType | tuple[Transformation] | None
|
|
None
|
left_connector_filter
|
NoneValueType | Filter | None
|
|
None
|
right_connector_stroke
|
NoneValueType | Color | None
|
|
None
|
right_connector_stroke_width
|
float | None
|
|
None
|
right_connector_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
|
None
|
right_connector_stroke_dashoffset
|
float | None
|
|
None
|
right_connector_fill
|
NoneValueType | Color | None
|
|
None
|
right_connector_transform
|
NoneValueType | tuple[Transformation] | None
|
|
None
|
right_connector_filter
|
NoneValueType | Filter | None
|
|
None
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
label_center
label_center() -> Point
Return the label center anchor of the node
Source code in src/momapy/core.py
791 792 793 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
Association
dataclass
Association(
*,
id_: str = get_uuid4_as_str(),
reactants: frozenset[Reactant] = frozenset(),
products: frozenset[Product] = frozenset(),
reversible: bool = False
)
Bases: GenericProcess
Class for associations
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'50b13b0f-b89e-48bb-8ef4-2140afe8963a'
|
reversible
|
bool
|
|
False
|
AssociationLayout
dataclass
AssociationLayout(
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
fill: NoneValueType | Color | None = black,
filter: NoneValueType | Filter | None = None,
height: float = 20.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 20.0,
direction: Direction = HORIZONTAL,
left_to_right: bool = True,
left_connector_length: float = 10.0,
right_connector_length: float = 10.0,
left_connector_stroke: (
NoneValueType | Color | None
) = None,
left_connector_stroke_width: float | None = None,
left_connector_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
left_connector_stroke_dashoffset: float | None = None,
left_connector_fill: (
NoneValueType | Color | None
) = None,
left_connector_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
left_connector_filter: (
NoneValueType | Filter | None
) = None,
right_connector_stroke: (
NoneValueType | Color | None
) = None,
right_connector_stroke_width: float | None = None,
right_connector_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
right_connector_stroke_dashoffset: float | None = None,
right_connector_fill: (
NoneValueType | Color | None
) = None,
right_connector_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
right_connector_filter: (
NoneValueType | Filter | None
) = None
)
Bases: _ConnectorsMixin, _SimpleMixin, SBGNNode
Class for association layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'104f50e9-d889-497b-839e-2f1c8d732791'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
20.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
20.0
|
direction
|
Direction
|
|
<Direction.HORIZONTAL: 1>
|
left_to_right
|
bool
|
|
True
|
left_connector_length
|
float
|
|
10.0
|
right_connector_length
|
float
|
|
10.0
|
left_connector_stroke
|
NoneValueType | Color | None
|
|
None
|
left_connector_stroke_width
|
float | None
|
|
None
|
left_connector_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
|
None
|
left_connector_stroke_dashoffset
|
float | None
|
|
None
|
left_connector_fill
|
NoneValueType | Color | None
|
|
None
|
left_connector_transform
|
NoneValueType | tuple[Transformation] | None
|
|
None
|
left_connector_filter
|
NoneValueType | Filter | None
|
|
None
|
right_connector_stroke
|
NoneValueType | Color | None
|
|
None
|
right_connector_stroke_width
|
float | None
|
|
None
|
right_connector_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
|
None
|
right_connector_stroke_dashoffset
|
float | None
|
|
None
|
right_connector_fill
|
NoneValueType | Color | None
|
|
None
|
right_connector_transform
|
NoneValueType | tuple[Transformation] | None
|
|
None
|
right_connector_filter
|
NoneValueType | Filter | None
|
|
None
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
label_center
label_center() -> Point
Return the label center anchor of the node
Source code in src/momapy/core.py
791 792 793 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
CardinalityLayout
dataclass
CardinalityLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 19.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 12.0
)
Bases: _SimpleMixin, SBGNNode
Class for cardinality layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'7bf5f910-f1da-47a1-a660-571bdce338fd'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
19.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
12.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east
east() -> Point
Return the east anchor of the node
Source code in src/momapy/core.py
719 720 721 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
label_center
label_center() -> Point
Return the label center anchor of the node
Source code in src/momapy/core.py
791 792 793 | |
north
north() -> Point
Return the north anchor of the node
Source code in src/momapy/core.py
691 692 693 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south
south() -> Point
Return the south anchor of the node
Source code in src/momapy/core.py
747 748 749 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west
west() -> Point
Return the west anchor of the node
Source code in src/momapy/core.py
775 776 777 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
Catalysis
dataclass
Catalysis(
*,
id_: str = get_uuid4_as_str(),
source: EntityPool | LogicalOperator,
target: Process
)
Bases: Stimulation
Class for catalyses
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'fdf477d5-0f80-4787-b284-65ac2076a3e1'
|
source
|
EntityPool | LogicalOperator
|
|
required |
target
|
Process
|
|
required |
CatalysisLayout
dataclass
CatalysisLayout(
path_fill: NoneValueType | Color | None = NoneValue,
path_stroke: NoneValueType | Color | None = black,
path_stroke_width: float | None = 1.25,
arrowhead_fill: NoneValueType | Color | None = white,
arrowhead_stroke: NoneValueType | Color | None = black,
arrowhead_stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
end_shorten: float = 0.0,
fill: NoneValueType | Color | None = None,
filter: NoneValueType | Filter | None = None,
path_filter: NoneValueType | Filter | None = None,
path_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
path_stroke_dashoffset: float | None = None,
path_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
stroke: NoneValueType | Color | None = None,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
stroke_width: float | None = None,
segments: tuple[
Segment | BezierCurve | EllipticalArc
] = tuple(),
source: LayoutElement | None = None,
start_shorten: float = 0.0,
target: LayoutElement | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
arrowhead_filter: NoneValueType | Filter | None = None,
arrowhead_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
arrowhead_stroke_dashoffset: float | None = None,
arrowhead_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
arrowhead_height: float = 10.0,
arrowhead_width: float = 10.0
)
Bases: SBGNSingleHeadedArc
Class for catalysis layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'83dcf0eb-98b0-4329-8e4e-b09a02d83248'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
end_shorten
|
float
|
The length the end of the arc will be shorten by |
0.0
|
fill
|
NoneValueType | Color | None
|
The fill color of the arc |
None
|
filter
|
NoneValueType | Filter | None
|
The fill filter of the arc |
None
|
path_fill
|
NoneValueType | Color | None
|
|
<momapy.drawing.NoneValueType object at 0x7f3954141040>
|
path_filter
|
NoneValueType | Filter | None
|
The path filter of the arc |
None
|
path_stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
path_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The path stroke dasharray of the arc |
None
|
path_stroke_dashoffset
|
float | None
|
The path stroke dashoffset of the arc |
None
|
path_stroke_width
|
float | None
|
|
1.25
|
path_transform
|
NoneValueType | tuple[Transformation] | None
|
The path transform of the arc |
None
|
stroke
|
NoneValueType | Color | None
|
The stroke color of the arc |
None
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the arc |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the arc |
None
|
stroke_width
|
float | None
|
The stroke width of the arc |
None
|
segments
|
tuple[Union[Segment, BezierCurve, EllipticalArc]]
|
The path segments of the arc |
<dynamic>
|
source
|
LayoutElement | None
|
The source of the arc |
None
|
start_shorten
|
float
|
The length the start of the arc will be shorten by |
0.0
|
target
|
LayoutElement | None
|
The target of the arc |
None
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the arc |
None
|
arrowhead_fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
arrowhead_filter
|
NoneValueType | Filter | None
|
The arrowhead filter of the arc |
None
|
arrowhead_stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
arrowhead_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The arrowhead stroke dasharray of the arc |
None
|
arrowhead_stroke_dashoffset
|
float | None
|
The arrowhead stroke dashoffset of the arc |
None
|
arrowhead_stroke_width
|
float | None
|
|
1.25
|
arrowhead_transform
|
NoneValueType | tuple[Transformation] | None
|
The arrowhead transform of the arc |
None
|
arrowhead_height
|
float
|
|
10.0
|
arrowhead_width
|
float
|
|
10.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
arrowhead_base |
Return the arrowhead base anchor point of the single-headed arc |
arrowhead_bbox |
Return the bounding box of the single-headed arc arrowhead |
arrowhead_border |
Return the point at the intersection of the drawing elements of the single-headed arc arrowhead and the line going through the center of these drawing elements and the given point. |
arrowhead_drawing_elements |
Return the drawing elements of the single-headed arc arrowhead |
arrowhead_length |
Return the length of the single-headed arc arrowhead |
arrowhead_tip |
Return the arrowhead tip anchor point of the single-headed arc |
bbox |
Compute and return the bounding box of the layout element |
childless |
Return a copy of the arc with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
end_point |
Return the ending point of the arc |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
fraction |
Return the position and angle on the arc at a given fraction (of the total arc length) |
length |
Return the total length of the arc path |
path_drawing_elements |
Return the drawing elements of the single-headed arc path |
points |
Return the points of the arc path |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_children |
Return the self children of the arc |
self_drawing_elements |
Return the self drawing elements of the single-headed arc |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
start_point |
Return the starting point of the arc |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
arrowhead_base
arrowhead_base() -> Point
Return the arrowhead base anchor point of the single-headed arc
Source code in src/momapy/core.py
1089 1090 1091 1092 1093 1094 1095 1096 1097 | |
arrowhead_bbox
arrowhead_bbox() -> Bbox
Return the bounding box of the single-headed arc arrowhead
Source code in src/momapy/core.py
1099 1100 1101 1102 1103 | |
arrowhead_border
arrowhead_border(point) -> Point
Return the point at the intersection of the drawing elements of the single-headed arc arrowhead and the line going through the center of these drawing elements and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 | |
arrowhead_drawing_elements
arrowhead_drawing_elements() -> list[DrawingElement]
Return the drawing elements of the single-headed arc arrowhead
Source code in src/momapy/core.py
1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 | |
arrowhead_length
arrowhead_length() -> float
Return the length of the single-headed arc arrowhead
Source code in src/momapy/core.py
1071 1072 1073 1074 1075 1076 1077 1078 | |
arrowhead_tip
arrowhead_tip() -> Point
Return the arrowhead tip anchor point of the single-headed arc
Source code in src/momapy/core.py
1080 1081 1082 1083 1084 1085 1086 1087 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
childless
childless() -> Self
Return a copy of the arc with no children
Source code in src/momapy/core.py
978 979 980 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
end_point
end_point() -> Point
Return the ending point of the arc
Source code in src/momapy/core.py
974 975 976 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
fraction
fraction(fraction: float) -> tuple[Point, float]
Return the position and angle on the arc at a given fraction (of the total arc length)
Source code in src/momapy/core.py
982 983 984 985 986 987 988 989 990 991 | |
length
length()
Return the total length of the arc path
Source code in src/momapy/core.py
966 967 968 | |
path_drawing_elements
path_drawing_elements() -> list[Path]
Return the drawing elements of the single-headed arc path
Source code in src/momapy/core.py
1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 | |
points
points() -> list[Point]
Return the points of the arc path
Source code in src/momapy/core.py
958 959 960 961 962 963 964 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the arc
Source code in src/momapy/core.py
954 955 956 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the single-headed arc
Source code in src/momapy/core.py
1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
start_point
start_point() -> Point
Return the starting point of the arc
Source code in src/momapy/core.py
970 971 972 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
Compartment
dataclass
Compartment(
*,
id_: str = get_uuid4_as_str(),
label: str | None = None,
state_variables: frozenset[StateVariable] = frozenset(),
units_of_information: frozenset[
UnitOfInformation
] = frozenset()
)
Bases: SBGNModelElement
Class for compartments
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'639ded38-cfeb-48aa-8e68-18e49a3fa508'
|
label
|
str | None
|
|
None
|
CompartmentLayout
dataclass
CompartmentLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 80.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
stroke_width: float = 3.25,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 80.0,
rounded_corners: float = 5.0
)
Bases: _SimpleMixin, SBGNNode
Class for compartment layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'8a67ae85-87df-4f92-b2e7-cf4f53cdfd4e'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
80.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float
|
|
3.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
80.0
|
rounded_corners
|
float
|
|
5.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east
east() -> Point
Return the east anchor of the node
Source code in src/momapy/core.py
719 720 721 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
label_center
label_center() -> Point
Return the label center anchor of the node
Source code in src/momapy/core.py
791 792 793 | |
north
north() -> Point
Return the north anchor of the node
Source code in src/momapy/core.py
691 692 693 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south
south() -> Point
Return the south anchor of the node
Source code in src/momapy/core.py
747 748 749 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west
west() -> Point
Return the west anchor of the node
Source code in src/momapy/core.py
775 776 777 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
Complex
dataclass
Complex(
*,
id_: str = get_uuid4_as_str(),
compartment: Compartment | None = None,
label: str | None = None,
state_variables: frozenset[StateVariable] = frozenset(),
units_of_information: frozenset[
UnitOfInformation
] = frozenset(),
subunits: frozenset[Subunit] = frozenset()
)
Bases: EntityPool
Class for complexes
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'56d51f68-4c00-4951-b54d-b5d3efa82cf0'
|
compartment
|
Compartment | None
|
|
None
|
label
|
str | None
|
|
None
|
ComplexLayout
dataclass
ComplexLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 44.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 44.0,
cut_corners: float = 5.0
)
Bases: _SimpleMixin, SBGNNode
Class for complex layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'269ad92a-6c7d-41b9-82dd-55a3b57a2266'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
44.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
44.0
|
cut_corners
|
float
|
|
5.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east
east() -> Point
Return the east anchor of the node
Source code in src/momapy/core.py
719 720 721 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
label_center
label_center() -> Point
Return the label center anchor of the node
Source code in src/momapy/core.py
791 792 793 | |
north
north() -> Point
Return the north anchor of the node
Source code in src/momapy/core.py
691 692 693 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south
south() -> Point
Return the south anchor of the node
Source code in src/momapy/core.py
747 748 749 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west
west() -> Point
Return the west anchor of the node
Source code in src/momapy/core.py
775 776 777 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
ComplexMultimer
dataclass
ComplexMultimer(
*,
id_: str = get_uuid4_as_str(),
compartment: Compartment | None = None,
label: str | None = None,
state_variables: frozenset[StateVariable] = frozenset(),
units_of_information: frozenset[
UnitOfInformation
] = frozenset(),
subunits: frozenset[Subunit] = frozenset(),
cardinality: int | None = None
)
Bases: Multimer
Class for complex multimers
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'bf04663a-fecb-47c5-b229-72be84e9ec1b'
|
compartment
|
Compartment | None
|
|
None
|
label
|
str | None
|
|
None
|
cardinality
|
int | None
|
|
None
|
ComplexMultimerLayout
dataclass
ComplexMultimerLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
offset: float = 3.0,
subunits_stroke: (
tuple[NoneValueType | Color] | None
) = None,
subunits_stroke_width: (
tuple[NoneValueType | float] | None
) = None,
subunits_stroke_dasharray: (
tuple[NoneValueType | tuple[float]] | None
) = None,
subunits_stroke_dashoffset: tuple[float] | None = None,
subunits_fill: (
tuple[NoneValueType | Color] | None
) = None,
subunits_transform: (
tuple[NoneValueType | tuple[Transformation]] | None
) = None,
subunits_filter: (
tuple[NoneValueType | Filter] | None
) = None,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 44.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 44.0,
cut_corners: float = 5.0
)
Bases: _MultiMixin, SBGNNode
Class for complex multimer layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'add150dd-d267-4c7e-a8ae-f27f232e483d'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
44.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
44.0
|
offset
|
float
|
|
3.0
|
subunits_stroke
|
tuple[Union[NoneValueType, Color]] | None
|
|
None
|
subunits_stroke_width
|
tuple[Union[NoneValueType, float]] | None
|
|
None
|
subunits_stroke_dasharray
|
tuple[Union[NoneValueType, tuple[float]]] | None
|
|
None
|
subunits_stroke_dashoffset
|
tuple[float] | None
|
|
None
|
subunits_fill
|
tuple[Union[NoneValueType, Color]] | None
|
|
None
|
subunits_transform
|
tuple[Union[NoneValueType, tuple[Transformation]]] | None
|
|
None
|
subunits_filter
|
tuple[Union[NoneValueType, Filter]] | None
|
|
None
|
cut_corners
|
float
|
|
5.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east
east() -> Point
Return the east anchor of the node
Source code in src/momapy/core.py
719 720 721 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
north
north() -> Point
Return the north anchor of the node
Source code in src/momapy/core.py
691 692 693 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south
south() -> Point
Return the south anchor of the node
Source code in src/momapy/core.py
747 748 749 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west
west() -> Point
Return the west anchor of the node
Source code in src/momapy/core.py
775 776 777 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
ComplexMultimerSubunit
dataclass
ComplexMultimerSubunit(
*,
id_: str = get_uuid4_as_str(),
label: str | None = None,
state_variables: frozenset[StateVariable] = frozenset(),
units_of_information: frozenset[
UnitOfInformation
] = frozenset(),
subunits: frozenset[Subunit] = frozenset(),
cardinality: int | None = None
)
Bases: MultimerSubunit
Class for complex subunits
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'4cf4d117-b711-4743-9964-9a674e49e2c6'
|
label
|
str | None
|
|
None
|
cardinality
|
int | None
|
|
None
|
ComplexMultimerSubunitLayout
dataclass
ComplexMultimerSubunitLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
offset: float = 3.0,
subunits_stroke: (
tuple[NoneValueType | Color] | None
) = None,
subunits_stroke_width: (
tuple[NoneValueType | float] | None
) = None,
subunits_stroke_dasharray: (
tuple[NoneValueType | tuple[float]] | None
) = None,
subunits_stroke_dashoffset: tuple[float] | None = None,
subunits_fill: (
tuple[NoneValueType | Color] | None
) = None,
subunits_transform: (
tuple[NoneValueType | tuple[Transformation]] | None
) = None,
subunits_filter: (
tuple[NoneValueType | Filter] | None
) = None,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 30.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 60.0,
cut_corners: float = 5.0
)
Bases: _MultiMixin, SBGNNode
Class for complex multimer subunit layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'ed28b093-01c3-4f62-82ce-a384ef7c58fe'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
30.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
60.0
|
offset
|
float
|
|
3.0
|
subunits_stroke
|
tuple[Union[NoneValueType, Color]] | None
|
|
None
|
subunits_stroke_width
|
tuple[Union[NoneValueType, float]] | None
|
|
None
|
subunits_stroke_dasharray
|
tuple[Union[NoneValueType, tuple[float]]] | None
|
|
None
|
subunits_stroke_dashoffset
|
tuple[float] | None
|
|
None
|
subunits_fill
|
tuple[Union[NoneValueType, Color]] | None
|
|
None
|
subunits_transform
|
tuple[Union[NoneValueType, tuple[Transformation]]] | None
|
|
None
|
subunits_filter
|
tuple[Union[NoneValueType, Filter]] | None
|
|
None
|
cut_corners
|
float
|
|
5.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east
east() -> Point
Return the east anchor of the node
Source code in src/momapy/core.py
719 720 721 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
north
north() -> Point
Return the north anchor of the node
Source code in src/momapy/core.py
691 692 693 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south
south() -> Point
Return the south anchor of the node
Source code in src/momapy/core.py
747 748 749 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west
west() -> Point
Return the west anchor of the node
Source code in src/momapy/core.py
775 776 777 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
ComplexSubunit
dataclass
ComplexSubunit(
*,
id_: str = get_uuid4_as_str(),
label: str | None = None,
state_variables: frozenset[StateVariable] = frozenset(),
units_of_information: frozenset[
UnitOfInformation
] = frozenset(),
subunits: frozenset[Subunit] = frozenset()
)
Bases: Subunit
Class for complex subunits
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'32c40c61-954f-456b-b295-29de6a9887e7'
|
label
|
str | None
|
|
None
|
ComplexSubunitLayout
dataclass
ComplexSubunitLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 30.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 60.0,
cut_corners: float = 5.0
)
Bases: _SimpleMixin, SBGNNode
Class for complex subunit layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'5f351a2b-e5cc-456f-b365-b07b06634ccb'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
30.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
60.0
|
cut_corners
|
float
|
|
5.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east
east() -> Point
Return the east anchor of the node
Source code in src/momapy/core.py
719 720 721 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
label_center
label_center() -> Point
Return the label center anchor of the node
Source code in src/momapy/core.py
791 792 793 | |
north
north() -> Point
Return the north anchor of the node
Source code in src/momapy/core.py
691 692 693 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south
south() -> Point
Return the south anchor of the node
Source code in src/momapy/core.py
747 748 749 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west
west() -> Point
Return the west anchor of the node
Source code in src/momapy/core.py
775 776 777 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
ConsumptionLayout
dataclass
ConsumptionLayout(
path_fill: NoneValueType | Color | None = NoneValue,
path_stroke: NoneValueType | Color | None = black,
path_stroke_width: float | None = 1.25,
arrowhead_fill: NoneValueType | Color | None = white,
arrowhead_stroke: NoneValueType | Color | None = black,
arrowhead_stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
end_shorten: float = 0.0,
fill: NoneValueType | Color | None = None,
filter: NoneValueType | Filter | None = None,
path_filter: NoneValueType | Filter | None = None,
path_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
path_stroke_dashoffset: float | None = None,
path_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
stroke: NoneValueType | Color | None = None,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
stroke_width: float | None = None,
segments: tuple[
Segment | BezierCurve | EllipticalArc
] = tuple(),
source: LayoutElement | None = None,
start_shorten: float = 0.0,
target: LayoutElement | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
arrowhead_filter: NoneValueType | Filter | None = None,
arrowhead_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
arrowhead_stroke_dashoffset: float | None = None,
arrowhead_transform: (
NoneValueType | tuple[Transformation] | None
) = None
)
Bases: SBGNSingleHeadedArc
Class for consumption layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'd795cd71-8be1-4328-912c-c83970ff3bf8'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
end_shorten
|
float
|
The length the end of the arc will be shorten by |
0.0
|
fill
|
NoneValueType | Color | None
|
The fill color of the arc |
None
|
filter
|
NoneValueType | Filter | None
|
The fill filter of the arc |
None
|
path_fill
|
NoneValueType | Color | None
|
|
<momapy.drawing.NoneValueType object at 0x7f3954141040>
|
path_filter
|
NoneValueType | Filter | None
|
The path filter of the arc |
None
|
path_stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
path_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The path stroke dasharray of the arc |
None
|
path_stroke_dashoffset
|
float | None
|
The path stroke dashoffset of the arc |
None
|
path_stroke_width
|
float | None
|
|
1.25
|
path_transform
|
NoneValueType | tuple[Transformation] | None
|
The path transform of the arc |
None
|
stroke
|
NoneValueType | Color | None
|
The stroke color of the arc |
None
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the arc |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the arc |
None
|
stroke_width
|
float | None
|
The stroke width of the arc |
None
|
segments
|
tuple[Union[Segment, BezierCurve, EllipticalArc]]
|
The path segments of the arc |
<dynamic>
|
source
|
LayoutElement | None
|
The source of the arc |
None
|
start_shorten
|
float
|
The length the start of the arc will be shorten by |
0.0
|
target
|
LayoutElement | None
|
The target of the arc |
None
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the arc |
None
|
arrowhead_fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
arrowhead_filter
|
NoneValueType | Filter | None
|
The arrowhead filter of the arc |
None
|
arrowhead_stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
arrowhead_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The arrowhead stroke dasharray of the arc |
None
|
arrowhead_stroke_dashoffset
|
float | None
|
The arrowhead stroke dashoffset of the arc |
None
|
arrowhead_stroke_width
|
float | None
|
|
1.25
|
arrowhead_transform
|
NoneValueType | tuple[Transformation] | None
|
The arrowhead transform of the arc |
None
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
arrowhead_base |
Return the arrowhead base anchor point of the single-headed arc |
arrowhead_bbox |
Return the bounding box of the single-headed arc arrowhead |
arrowhead_border |
Return the point at the intersection of the drawing elements of the single-headed arc arrowhead and the line going through the center of these drawing elements and the given point. |
arrowhead_drawing_elements |
Return the drawing elements of the single-headed arc arrowhead |
arrowhead_length |
Return the length of the single-headed arc arrowhead |
arrowhead_tip |
Return the arrowhead tip anchor point of the single-headed arc |
bbox |
Compute and return the bounding box of the layout element |
childless |
Return a copy of the arc with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
end_point |
Return the ending point of the arc |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
fraction |
Return the position and angle on the arc at a given fraction (of the total arc length) |
length |
Return the total length of the arc path |
path_drawing_elements |
Return the drawing elements of the single-headed arc path |
points |
Return the points of the arc path |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_children |
Return the self children of the arc |
self_drawing_elements |
Return the self drawing elements of the single-headed arc |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
start_point |
Return the starting point of the arc |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
arrowhead_base
arrowhead_base() -> Point
Return the arrowhead base anchor point of the single-headed arc
Source code in src/momapy/core.py
1089 1090 1091 1092 1093 1094 1095 1096 1097 | |
arrowhead_bbox
arrowhead_bbox() -> Bbox
Return the bounding box of the single-headed arc arrowhead
Source code in src/momapy/core.py
1099 1100 1101 1102 1103 | |
arrowhead_border
arrowhead_border(point) -> Point
Return the point at the intersection of the drawing elements of the single-headed arc arrowhead and the line going through the center of these drawing elements and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 | |
arrowhead_drawing_elements
arrowhead_drawing_elements() -> list[DrawingElement]
Return the drawing elements of the single-headed arc arrowhead
Source code in src/momapy/core.py
1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 | |
arrowhead_length
arrowhead_length() -> float
Return the length of the single-headed arc arrowhead
Source code in src/momapy/core.py
1071 1072 1073 1074 1075 1076 1077 1078 | |
arrowhead_tip
arrowhead_tip() -> Point
Return the arrowhead tip anchor point of the single-headed arc
Source code in src/momapy/core.py
1080 1081 1082 1083 1084 1085 1086 1087 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
childless
childless() -> Self
Return a copy of the arc with no children
Source code in src/momapy/core.py
978 979 980 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
end_point
end_point() -> Point
Return the ending point of the arc
Source code in src/momapy/core.py
974 975 976 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
fraction
fraction(fraction: float) -> tuple[Point, float]
Return the position and angle on the arc at a given fraction (of the total arc length)
Source code in src/momapy/core.py
982 983 984 985 986 987 988 989 990 991 | |
length
length()
Return the total length of the arc path
Source code in src/momapy/core.py
966 967 968 | |
path_drawing_elements
path_drawing_elements() -> list[Path]
Return the drawing elements of the single-headed arc path
Source code in src/momapy/core.py
1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 | |
points
points() -> list[Point]
Return the points of the arc path
Source code in src/momapy/core.py
958 959 960 961 962 963 964 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the arc
Source code in src/momapy/core.py
954 955 956 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the single-headed arc
Source code in src/momapy/core.py
1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
start_point
start_point() -> Point
Return the starting point of the arc
Source code in src/momapy/core.py
970 971 972 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
Dissociation
dataclass
Dissociation(
*,
id_: str = get_uuid4_as_str(),
reactants: frozenset[Reactant] = frozenset(),
products: frozenset[Product] = frozenset(),
reversible: bool = False
)
Bases: GenericProcess
Class for dissociations
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'205b8641-3f48-41cb-a97b-04c3af5e447c'
|
reversible
|
bool
|
|
False
|
DissociationLayout
dataclass
DissociationLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 20.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 20.0,
direction: Direction = HORIZONTAL,
left_to_right: bool = True,
left_connector_length: float = 10.0,
right_connector_length: float = 10.0,
left_connector_stroke: (
NoneValueType | Color | None
) = None,
left_connector_stroke_width: float | None = None,
left_connector_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
left_connector_stroke_dashoffset: float | None = None,
left_connector_fill: (
NoneValueType | Color | None
) = None,
left_connector_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
left_connector_filter: (
NoneValueType | Filter | None
) = None,
right_connector_stroke: (
NoneValueType | Color | None
) = None,
right_connector_stroke_width: float | None = None,
right_connector_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
right_connector_stroke_dashoffset: float | None = None,
right_connector_fill: (
NoneValueType | Color | None
) = None,
right_connector_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
right_connector_filter: (
NoneValueType | Filter | None
) = None,
sep: float = 3.0
)
Bases: _ConnectorsMixin, _SimpleMixin, SBGNNode
Class for dissociation layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'53a0873d-d36c-4189-ab2a-92060107a93b'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
20.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
20.0
|
direction
|
Direction
|
|
<Direction.HORIZONTAL: 1>
|
left_to_right
|
bool
|
|
True
|
left_connector_length
|
float
|
|
10.0
|
right_connector_length
|
float
|
|
10.0
|
left_connector_stroke
|
NoneValueType | Color | None
|
|
None
|
left_connector_stroke_width
|
float | None
|
|
None
|
left_connector_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
|
None
|
left_connector_stroke_dashoffset
|
float | None
|
|
None
|
left_connector_fill
|
NoneValueType | Color | None
|
|
None
|
left_connector_transform
|
NoneValueType | tuple[Transformation] | None
|
|
None
|
left_connector_filter
|
NoneValueType | Filter | None
|
|
None
|
right_connector_stroke
|
NoneValueType | Color | None
|
|
None
|
right_connector_stroke_width
|
float | None
|
|
None
|
right_connector_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
|
None
|
right_connector_stroke_dashoffset
|
float | None
|
|
None
|
right_connector_fill
|
NoneValueType | Color | None
|
|
None
|
right_connector_transform
|
NoneValueType | tuple[Transformation] | None
|
|
None
|
right_connector_filter
|
NoneValueType | Filter | None
|
|
None
|
sep
|
float
|
|
3.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
label_center
label_center() -> Point
Return the label center anchor of the node
Source code in src/momapy/core.py
791 792 793 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
EmptySet
dataclass
EmptySet(
*,
id_: str = get_uuid4_as_str(),
compartment: Compartment | None = None
)
Bases: EntityPool
Class for empty sets
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'800e7c54-a8d3-42e0-a8f0-49081f36a295'
|
compartment
|
Compartment | None
|
|
None
|
EmptySetLayout
dataclass
EmptySetLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 22.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 22.0
)
Bases: _SimpleMixin, SBGNNode
Class for empty set layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'12de1bd3-7c84-4d98-9977-24e05d6efc67'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
22.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
22.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east
east() -> Point
Return the east anchor of the node
Source code in src/momapy/core.py
719 720 721 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
label_center
label_center() -> Point
Return the label center anchor of the node
Source code in src/momapy/core.py
791 792 793 | |
north
north() -> Point
Return the north anchor of the node
Source code in src/momapy/core.py
691 692 693 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south
south() -> Point
Return the south anchor of the node
Source code in src/momapy/core.py
747 748 749 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west
west() -> Point
Return the west anchor of the node
Source code in src/momapy/core.py
775 776 777 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
EntityPool
dataclass
EntityPool(
*,
id_: str = get_uuid4_as_str(),
compartment: Compartment | None = None
)
Bases: SBGNModelElement
Base class for entity pools
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'1cbfe59a-01e5-4467-a980-9eb2a716efdd'
|
compartment
|
Compartment | None
|
|
None
|
EquivalenceArcLayout
dataclass
EquivalenceArcLayout(
path_fill: NoneValueType | Color | None = NoneValue,
path_stroke: NoneValueType | Color | None = black,
path_stroke_width: float | None = 1.25,
arrowhead_fill: NoneValueType | Color | None = white,
arrowhead_stroke: NoneValueType | Color | None = black,
arrowhead_stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
end_shorten: float = 0.0,
fill: NoneValueType | Color | None = None,
filter: NoneValueType | Filter | None = None,
path_filter: NoneValueType | Filter | None = None,
path_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
path_stroke_dashoffset: float | None = None,
path_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
stroke: NoneValueType | Color | None = None,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
stroke_width: float | None = None,
segments: tuple[
Segment | BezierCurve | EllipticalArc
] = tuple(),
source: LayoutElement | None = None,
start_shorten: float = 0.0,
target: LayoutElement | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
arrowhead_filter: NoneValueType | Filter | None = None,
arrowhead_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
arrowhead_stroke_dashoffset: float | None = None,
arrowhead_transform: (
NoneValueType | tuple[Transformation] | None
) = None
)
Bases: SBGNSingleHeadedArc
Class for equivalence arc layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'2fc7ee4a-fb97-4de7-bc25-fb42019790e0'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
end_shorten
|
float
|
The length the end of the arc will be shorten by |
0.0
|
fill
|
NoneValueType | Color | None
|
The fill color of the arc |
None
|
filter
|
NoneValueType | Filter | None
|
The fill filter of the arc |
None
|
path_fill
|
NoneValueType | Color | None
|
|
<momapy.drawing.NoneValueType object at 0x7f3954141040>
|
path_filter
|
NoneValueType | Filter | None
|
The path filter of the arc |
None
|
path_stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
path_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The path stroke dasharray of the arc |
None
|
path_stroke_dashoffset
|
float | None
|
The path stroke dashoffset of the arc |
None
|
path_stroke_width
|
float | None
|
|
1.25
|
path_transform
|
NoneValueType | tuple[Transformation] | None
|
The path transform of the arc |
None
|
stroke
|
NoneValueType | Color | None
|
The stroke color of the arc |
None
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the arc |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the arc |
None
|
stroke_width
|
float | None
|
The stroke width of the arc |
None
|
segments
|
tuple[Union[Segment, BezierCurve, EllipticalArc]]
|
The path segments of the arc |
<dynamic>
|
source
|
LayoutElement | None
|
The source of the arc |
None
|
start_shorten
|
float
|
The length the start of the arc will be shorten by |
0.0
|
target
|
LayoutElement | None
|
The target of the arc |
None
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the arc |
None
|
arrowhead_fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
arrowhead_filter
|
NoneValueType | Filter | None
|
The arrowhead filter of the arc |
None
|
arrowhead_stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
arrowhead_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The arrowhead stroke dasharray of the arc |
None
|
arrowhead_stroke_dashoffset
|
float | None
|
The arrowhead stroke dashoffset of the arc |
None
|
arrowhead_stroke_width
|
float | None
|
|
1.25
|
arrowhead_transform
|
NoneValueType | tuple[Transformation] | None
|
The arrowhead transform of the arc |
None
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
arrowhead_base |
Return the arrowhead base anchor point of the single-headed arc |
arrowhead_bbox |
Return the bounding box of the single-headed arc arrowhead |
arrowhead_border |
Return the point at the intersection of the drawing elements of the single-headed arc arrowhead and the line going through the center of these drawing elements and the given point. |
arrowhead_drawing_elements |
Return the drawing elements of the single-headed arc arrowhead |
arrowhead_length |
Return the length of the single-headed arc arrowhead |
arrowhead_tip |
Return the arrowhead tip anchor point of the single-headed arc |
bbox |
Compute and return the bounding box of the layout element |
childless |
Return a copy of the arc with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
end_point |
Return the ending point of the arc |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
fraction |
Return the position and angle on the arc at a given fraction (of the total arc length) |
length |
Return the total length of the arc path |
path_drawing_elements |
Return the drawing elements of the single-headed arc path |
points |
Return the points of the arc path |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_children |
Return the self children of the arc |
self_drawing_elements |
Return the self drawing elements of the single-headed arc |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
start_point |
Return the starting point of the arc |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
arrowhead_base
arrowhead_base() -> Point
Return the arrowhead base anchor point of the single-headed arc
Source code in src/momapy/core.py
1089 1090 1091 1092 1093 1094 1095 1096 1097 | |
arrowhead_bbox
arrowhead_bbox() -> Bbox
Return the bounding box of the single-headed arc arrowhead
Source code in src/momapy/core.py
1099 1100 1101 1102 1103 | |
arrowhead_border
arrowhead_border(point) -> Point
Return the point at the intersection of the drawing elements of the single-headed arc arrowhead and the line going through the center of these drawing elements and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 | |
arrowhead_drawing_elements
arrowhead_drawing_elements() -> list[DrawingElement]
Return the drawing elements of the single-headed arc arrowhead
Source code in src/momapy/core.py
1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 | |
arrowhead_length
arrowhead_length() -> float
Return the length of the single-headed arc arrowhead
Source code in src/momapy/core.py
1071 1072 1073 1074 1075 1076 1077 1078 | |
arrowhead_tip
arrowhead_tip() -> Point
Return the arrowhead tip anchor point of the single-headed arc
Source code in src/momapy/core.py
1080 1081 1082 1083 1084 1085 1086 1087 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
childless
childless() -> Self
Return a copy of the arc with no children
Source code in src/momapy/core.py
978 979 980 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
end_point
end_point() -> Point
Return the ending point of the arc
Source code in src/momapy/core.py
974 975 976 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
fraction
fraction(fraction: float) -> tuple[Point, float]
Return the position and angle on the arc at a given fraction (of the total arc length)
Source code in src/momapy/core.py
982 983 984 985 986 987 988 989 990 991 | |
length
length()
Return the total length of the arc path
Source code in src/momapy/core.py
966 967 968 | |
path_drawing_elements
path_drawing_elements() -> list[Path]
Return the drawing elements of the single-headed arc path
Source code in src/momapy/core.py
1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 | |
points
points() -> list[Point]
Return the points of the arc path
Source code in src/momapy/core.py
958 959 960 961 962 963 964 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the arc
Source code in src/momapy/core.py
954 955 956 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the single-headed arc
Source code in src/momapy/core.py
1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
start_point
start_point() -> Point
Return the starting point of the arc
Source code in src/momapy/core.py
970 971 972 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
EquivalenceOperator
dataclass
EquivalenceOperator(
*,
id_: str = get_uuid4_as_str(),
inputs: frozenset[
EquivalenceOperatorInput
] = frozenset(),
output: EquivalenceOperatorOutput | None = None
)
Bases: SBGNModelElement
Class for equivalence operators
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'2abb0f21-fb66-490a-b925-8fa859c30cb7'
|
output
|
EquivalenceOperatorOutput | None
|
|
None
|
EquivalenceOperatorInput
dataclass
EquivalenceOperatorInput(
*, id_: str = get_uuid4_as_str(), element: EntityPool
)
Bases: SBGNRole
Class for inputs of equivalence operators
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'5e3acb64-a6db-4bb4-82fd-a1fb3702c493'
|
element
|
EntityPool
|
|
required |
EquivalenceOperatorLayout
dataclass
EquivalenceOperatorLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 30.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 30.0,
direction: Direction = HORIZONTAL,
left_to_right: bool = True,
left_connector_length: float = 10.0,
right_connector_length: float = 10.0,
left_connector_stroke: (
NoneValueType | Color | None
) = None,
left_connector_stroke_width: float | None = None,
left_connector_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
left_connector_stroke_dashoffset: float | None = None,
left_connector_fill: (
NoneValueType | Color | None
) = None,
left_connector_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
left_connector_filter: (
NoneValueType | Filter | None
) = None,
right_connector_stroke: (
NoneValueType | Color | None
) = None,
right_connector_stroke_width: float | None = None,
right_connector_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
right_connector_stroke_dashoffset: float | None = None,
right_connector_fill: (
NoneValueType | Color | None
) = None,
right_connector_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
right_connector_filter: (
NoneValueType | Filter | None
) = None
)
Bases: _ConnectorsMixin, _SimpleMixin, _TextMixin, SBGNNode
Class for equivalence operator layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'504616bb-9e9e-41ba-b4be-29db28feb025'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
30.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
30.0
|
direction
|
Direction
|
|
<Direction.HORIZONTAL: 1>
|
left_to_right
|
bool
|
|
True
|
left_connector_length
|
float
|
|
10.0
|
right_connector_length
|
float
|
|
10.0
|
left_connector_stroke
|
NoneValueType | Color | None
|
|
None
|
left_connector_stroke_width
|
float | None
|
|
None
|
left_connector_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
|
None
|
left_connector_stroke_dashoffset
|
float | None
|
|
None
|
left_connector_fill
|
NoneValueType | Color | None
|
|
None
|
left_connector_transform
|
NoneValueType | tuple[Transformation] | None
|
|
None
|
left_connector_filter
|
NoneValueType | Filter | None
|
|
None
|
right_connector_stroke
|
NoneValueType | Color | None
|
|
None
|
right_connector_stroke_width
|
float | None
|
|
None
|
right_connector_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
|
None
|
right_connector_stroke_dashoffset
|
float | None
|
|
None
|
right_connector_fill
|
NoneValueType | Color | None
|
|
None
|
right_connector_transform
|
NoneValueType | tuple[Transformation] | None
|
|
None
|
right_connector_filter
|
NoneValueType | Filter | None
|
|
None
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
label_center
label_center() -> Point
Return the label center anchor of the node
Source code in src/momapy/core.py
791 792 793 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
EquivalenceOperatorOutput
dataclass
EquivalenceOperatorOutput(
*, id_: str = get_uuid4_as_str(), element: EntityPool
)
Bases: SBGNRole
Class for outputs of equivalence operators
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'2563d2ae-ce40-4bef-bd5a-0b32fcfb5d96'
|
element
|
EntityPool
|
|
required |
FluxRole
dataclass
FluxRole(
*,
id_: str = get_uuid4_as_str(),
element: EntityPool,
stoichiometry: int | None = None
)
Bases: SBGNRole
Base class for flux roles
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'0513cf04-2f7d-44bb-8d31-e8571763a8cb'
|
element
|
EntityPool
|
|
required |
stoichiometry
|
int | None
|
|
None
|
GenericProcess
dataclass
GenericProcess(
*,
id_: str = get_uuid4_as_str(),
reactants: frozenset[Reactant] = frozenset(),
products: frozenset[Product] = frozenset(),
reversible: bool = False
)
Bases: StoichiometricProcess
Class for generic processes
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'cba11dae-8ce5-4ab3-acbb-d0ed19f35a06'
|
reversible
|
bool
|
|
False
|
GenericProcessLayout
dataclass
GenericProcessLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 20.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 20.0,
direction: Direction = HORIZONTAL,
left_to_right: bool = True,
left_connector_length: float = 10.0,
right_connector_length: float = 10.0,
left_connector_stroke: (
NoneValueType | Color | None
) = None,
left_connector_stroke_width: float | None = None,
left_connector_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
left_connector_stroke_dashoffset: float | None = None,
left_connector_fill: (
NoneValueType | Color | None
) = None,
left_connector_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
left_connector_filter: (
NoneValueType | Filter | None
) = None,
right_connector_stroke: (
NoneValueType | Color | None
) = None,
right_connector_stroke_width: float | None = None,
right_connector_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
right_connector_stroke_dashoffset: float | None = None,
right_connector_fill: (
NoneValueType | Color | None
) = None,
right_connector_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
right_connector_filter: (
NoneValueType | Filter | None
) = None
)
Bases: _ConnectorsMixin, _SimpleMixin, SBGNNode
Class for generic process layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'397ca594-b856-48e1-ab96-372d19b1e53c'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
20.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
20.0
|
direction
|
Direction
|
|
<Direction.HORIZONTAL: 1>
|
left_to_right
|
bool
|
|
True
|
left_connector_length
|
float
|
|
10.0
|
right_connector_length
|
float
|
|
10.0
|
left_connector_stroke
|
NoneValueType | Color | None
|
|
None
|
left_connector_stroke_width
|
float | None
|
|
None
|
left_connector_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
|
None
|
left_connector_stroke_dashoffset
|
float | None
|
|
None
|
left_connector_fill
|
NoneValueType | Color | None
|
|
None
|
left_connector_transform
|
NoneValueType | tuple[Transformation] | None
|
|
None
|
left_connector_filter
|
NoneValueType | Filter | None
|
|
None
|
right_connector_stroke
|
NoneValueType | Color | None
|
|
None
|
right_connector_stroke_width
|
float | None
|
|
None
|
right_connector_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
|
None
|
right_connector_stroke_dashoffset
|
float | None
|
|
None
|
right_connector_fill
|
NoneValueType | Color | None
|
|
None
|
right_connector_transform
|
NoneValueType | tuple[Transformation] | None
|
|
None
|
right_connector_filter
|
NoneValueType | Filter | None
|
|
None
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
label_center
label_center() -> Point
Return the label center anchor of the node
Source code in src/momapy/core.py
791 792 793 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
Inhibition
dataclass
Inhibition(
*,
id_: str = get_uuid4_as_str(),
source: EntityPool | LogicalOperator,
target: Process
)
Bases: Modulation
Class for inhibitions
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'e2eb747d-4c04-4867-a920-fbdc21d64027'
|
source
|
EntityPool | LogicalOperator
|
|
required |
target
|
Process
|
|
required |
InhibitionLayout
dataclass
InhibitionLayout(
path_fill: NoneValueType | Color | None = NoneValue,
path_stroke: NoneValueType | Color | None = black,
path_stroke_width: float | None = 1.25,
arrowhead_fill: NoneValueType | Color | None = white,
arrowhead_stroke: NoneValueType | Color | None = black,
arrowhead_stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
end_shorten: float = 0.0,
fill: NoneValueType | Color | None = None,
filter: NoneValueType | Filter | None = None,
path_filter: NoneValueType | Filter | None = None,
path_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
path_stroke_dashoffset: float | None = None,
path_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
stroke: NoneValueType | Color | None = None,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
stroke_width: float | None = None,
segments: tuple[
Segment | BezierCurve | EllipticalArc
] = tuple(),
source: LayoutElement | None = None,
start_shorten: float = 0.0,
target: LayoutElement | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
arrowhead_filter: NoneValueType | Filter | None = None,
arrowhead_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
arrowhead_stroke_dashoffset: float | None = None,
arrowhead_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
arrowhead_height: float = 10.0
)
Bases: SBGNSingleHeadedArc
Class for inhibition layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'1532d04f-8f6a-4c62-87cb-d3e2c90a76eb'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
end_shorten
|
float
|
The length the end of the arc will be shorten by |
0.0
|
fill
|
NoneValueType | Color | None
|
The fill color of the arc |
None
|
filter
|
NoneValueType | Filter | None
|
The fill filter of the arc |
None
|
path_fill
|
NoneValueType | Color | None
|
|
<momapy.drawing.NoneValueType object at 0x7f3954141040>
|
path_filter
|
NoneValueType | Filter | None
|
The path filter of the arc |
None
|
path_stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
path_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The path stroke dasharray of the arc |
None
|
path_stroke_dashoffset
|
float | None
|
The path stroke dashoffset of the arc |
None
|
path_stroke_width
|
float | None
|
|
1.25
|
path_transform
|
NoneValueType | tuple[Transformation] | None
|
The path transform of the arc |
None
|
stroke
|
NoneValueType | Color | None
|
The stroke color of the arc |
None
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the arc |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the arc |
None
|
stroke_width
|
float | None
|
The stroke width of the arc |
None
|
segments
|
tuple[Union[Segment, BezierCurve, EllipticalArc]]
|
The path segments of the arc |
<dynamic>
|
source
|
LayoutElement | None
|
The source of the arc |
None
|
start_shorten
|
float
|
The length the start of the arc will be shorten by |
0.0
|
target
|
LayoutElement | None
|
The target of the arc |
None
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the arc |
None
|
arrowhead_fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
arrowhead_filter
|
NoneValueType | Filter | None
|
The arrowhead filter of the arc |
None
|
arrowhead_stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
arrowhead_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The arrowhead stroke dasharray of the arc |
None
|
arrowhead_stroke_dashoffset
|
float | None
|
The arrowhead stroke dashoffset of the arc |
None
|
arrowhead_stroke_width
|
float | None
|
|
1.25
|
arrowhead_transform
|
NoneValueType | tuple[Transformation] | None
|
The arrowhead transform of the arc |
None
|
arrowhead_height
|
float
|
|
10.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
arrowhead_base |
Return the arrowhead base anchor point of the single-headed arc |
arrowhead_bbox |
Return the bounding box of the single-headed arc arrowhead |
arrowhead_border |
Return the point at the intersection of the drawing elements of the single-headed arc arrowhead and the line going through the center of these drawing elements and the given point. |
arrowhead_drawing_elements |
Return the drawing elements of the single-headed arc arrowhead |
arrowhead_length |
Return the length of the single-headed arc arrowhead |
arrowhead_tip |
Return the arrowhead tip anchor point of the single-headed arc |
bbox |
Compute and return the bounding box of the layout element |
childless |
Return a copy of the arc with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
end_point |
Return the ending point of the arc |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
fraction |
Return the position and angle on the arc at a given fraction (of the total arc length) |
length |
Return the total length of the arc path |
path_drawing_elements |
Return the drawing elements of the single-headed arc path |
points |
Return the points of the arc path |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_children |
Return the self children of the arc |
self_drawing_elements |
Return the self drawing elements of the single-headed arc |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
start_point |
Return the starting point of the arc |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
arrowhead_base
arrowhead_base() -> Point
Return the arrowhead base anchor point of the single-headed arc
Source code in src/momapy/core.py
1089 1090 1091 1092 1093 1094 1095 1096 1097 | |
arrowhead_bbox
arrowhead_bbox() -> Bbox
Return the bounding box of the single-headed arc arrowhead
Source code in src/momapy/core.py
1099 1100 1101 1102 1103 | |
arrowhead_border
arrowhead_border(point) -> Point
Return the point at the intersection of the drawing elements of the single-headed arc arrowhead and the line going through the center of these drawing elements and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 | |
arrowhead_drawing_elements
arrowhead_drawing_elements() -> list[DrawingElement]
Return the drawing elements of the single-headed arc arrowhead
Source code in src/momapy/core.py
1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 | |
arrowhead_length
arrowhead_length() -> float
Return the length of the single-headed arc arrowhead
Source code in src/momapy/core.py
1071 1072 1073 1074 1075 1076 1077 1078 | |
arrowhead_tip
arrowhead_tip() -> Point
Return the arrowhead tip anchor point of the single-headed arc
Source code in src/momapy/core.py
1080 1081 1082 1083 1084 1085 1086 1087 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
childless
childless() -> Self
Return a copy of the arc with no children
Source code in src/momapy/core.py
978 979 980 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
end_point
end_point() -> Point
Return the ending point of the arc
Source code in src/momapy/core.py
974 975 976 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
fraction
fraction(fraction: float) -> tuple[Point, float]
Return the position and angle on the arc at a given fraction (of the total arc length)
Source code in src/momapy/core.py
982 983 984 985 986 987 988 989 990 991 | |
length
length()
Return the total length of the arc path
Source code in src/momapy/core.py
966 967 968 | |
path_drawing_elements
path_drawing_elements() -> list[Path]
Return the drawing elements of the single-headed arc path
Source code in src/momapy/core.py
1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 | |
points
points() -> list[Point]
Return the points of the arc path
Source code in src/momapy/core.py
958 959 960 961 962 963 964 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the arc
Source code in src/momapy/core.py
954 955 956 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the single-headed arc
Source code in src/momapy/core.py
1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
start_point
start_point() -> Point
Return the starting point of the arc
Source code in src/momapy/core.py
970 971 972 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
LogicArcLayout
dataclass
LogicArcLayout(
path_fill: NoneValueType | Color | None = NoneValue,
path_stroke: NoneValueType | Color | None = black,
path_stroke_width: float | None = 1.25,
arrowhead_fill: NoneValueType | Color | None = white,
arrowhead_stroke: NoneValueType | Color | None = black,
arrowhead_stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
end_shorten: float = 0.0,
fill: NoneValueType | Color | None = None,
filter: NoneValueType | Filter | None = None,
path_filter: NoneValueType | Filter | None = None,
path_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
path_stroke_dashoffset: float | None = None,
path_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
stroke: NoneValueType | Color | None = None,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
stroke_width: float | None = None,
segments: tuple[
Segment | BezierCurve | EllipticalArc
] = tuple(),
source: LayoutElement | None = None,
start_shorten: float = 0.0,
target: LayoutElement | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
arrowhead_filter: NoneValueType | Filter | None = None,
arrowhead_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
arrowhead_stroke_dashoffset: float | None = None,
arrowhead_transform: (
NoneValueType | tuple[Transformation] | None
) = None
)
Bases: SBGNSingleHeadedArc
Class for logic arc layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'e2a3ea9e-5bb2-4e42-a1ec-5579500346c8'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
end_shorten
|
float
|
The length the end of the arc will be shorten by |
0.0
|
fill
|
NoneValueType | Color | None
|
The fill color of the arc |
None
|
filter
|
NoneValueType | Filter | None
|
The fill filter of the arc |
None
|
path_fill
|
NoneValueType | Color | None
|
|
<momapy.drawing.NoneValueType object at 0x7f3954141040>
|
path_filter
|
NoneValueType | Filter | None
|
The path filter of the arc |
None
|
path_stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
path_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The path stroke dasharray of the arc |
None
|
path_stroke_dashoffset
|
float | None
|
The path stroke dashoffset of the arc |
None
|
path_stroke_width
|
float | None
|
|
1.25
|
path_transform
|
NoneValueType | tuple[Transformation] | None
|
The path transform of the arc |
None
|
stroke
|
NoneValueType | Color | None
|
The stroke color of the arc |
None
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the arc |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the arc |
None
|
stroke_width
|
float | None
|
The stroke width of the arc |
None
|
segments
|
tuple[Union[Segment, BezierCurve, EllipticalArc]]
|
The path segments of the arc |
<dynamic>
|
source
|
LayoutElement | None
|
The source of the arc |
None
|
start_shorten
|
float
|
The length the start of the arc will be shorten by |
0.0
|
target
|
LayoutElement | None
|
The target of the arc |
None
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the arc |
None
|
arrowhead_fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
arrowhead_filter
|
NoneValueType | Filter | None
|
The arrowhead filter of the arc |
None
|
arrowhead_stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
arrowhead_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The arrowhead stroke dasharray of the arc |
None
|
arrowhead_stroke_dashoffset
|
float | None
|
The arrowhead stroke dashoffset of the arc |
None
|
arrowhead_stroke_width
|
float | None
|
|
1.25
|
arrowhead_transform
|
NoneValueType | tuple[Transformation] | None
|
The arrowhead transform of the arc |
None
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
arrowhead_base |
Return the arrowhead base anchor point of the single-headed arc |
arrowhead_bbox |
Return the bounding box of the single-headed arc arrowhead |
arrowhead_border |
Return the point at the intersection of the drawing elements of the single-headed arc arrowhead and the line going through the center of these drawing elements and the given point. |
arrowhead_drawing_elements |
Return the drawing elements of the single-headed arc arrowhead |
arrowhead_length |
Return the length of the single-headed arc arrowhead |
arrowhead_tip |
Return the arrowhead tip anchor point of the single-headed arc |
bbox |
Compute and return the bounding box of the layout element |
childless |
Return a copy of the arc with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
end_point |
Return the ending point of the arc |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
fraction |
Return the position and angle on the arc at a given fraction (of the total arc length) |
length |
Return the total length of the arc path |
path_drawing_elements |
Return the drawing elements of the single-headed arc path |
points |
Return the points of the arc path |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_children |
Return the self children of the arc |
self_drawing_elements |
Return the self drawing elements of the single-headed arc |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
start_point |
Return the starting point of the arc |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
arrowhead_base
arrowhead_base() -> Point
Return the arrowhead base anchor point of the single-headed arc
Source code in src/momapy/core.py
1089 1090 1091 1092 1093 1094 1095 1096 1097 | |
arrowhead_bbox
arrowhead_bbox() -> Bbox
Return the bounding box of the single-headed arc arrowhead
Source code in src/momapy/core.py
1099 1100 1101 1102 1103 | |
arrowhead_border
arrowhead_border(point) -> Point
Return the point at the intersection of the drawing elements of the single-headed arc arrowhead and the line going through the center of these drawing elements and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 | |
arrowhead_drawing_elements
arrowhead_drawing_elements() -> list[DrawingElement]
Return the drawing elements of the single-headed arc arrowhead
Source code in src/momapy/core.py
1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 | |
arrowhead_length
arrowhead_length() -> float
Return the length of the single-headed arc arrowhead
Source code in src/momapy/core.py
1071 1072 1073 1074 1075 1076 1077 1078 | |
arrowhead_tip
arrowhead_tip() -> Point
Return the arrowhead tip anchor point of the single-headed arc
Source code in src/momapy/core.py
1080 1081 1082 1083 1084 1085 1086 1087 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
childless
childless() -> Self
Return a copy of the arc with no children
Source code in src/momapy/core.py
978 979 980 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
end_point
end_point() -> Point
Return the ending point of the arc
Source code in src/momapy/core.py
974 975 976 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
fraction
fraction(fraction: float) -> tuple[Point, float]
Return the position and angle on the arc at a given fraction (of the total arc length)
Source code in src/momapy/core.py
982 983 984 985 986 987 988 989 990 991 | |
length
length()
Return the total length of the arc path
Source code in src/momapy/core.py
966 967 968 | |
path_drawing_elements
path_drawing_elements() -> list[Path]
Return the drawing elements of the single-headed arc path
Source code in src/momapy/core.py
1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 | |
points
points() -> list[Point]
Return the points of the arc path
Source code in src/momapy/core.py
958 959 960 961 962 963 964 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the arc
Source code in src/momapy/core.py
954 955 956 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the single-headed arc
Source code in src/momapy/core.py
1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
start_point
start_point() -> Point
Return the starting point of the arc
Source code in src/momapy/core.py
970 971 972 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
LogicalOperator
dataclass
LogicalOperator(
*,
id_: str = get_uuid4_as_str(),
inputs: frozenset[LogicalOperatorInput] = frozenset()
)
Bases: SBGNModelElement
Class for logical operators
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'f6ba3aa7-571e-4e59-bbc7-cf9ee1b6d2d9'
|
LogicalOperatorInput
dataclass
LogicalOperatorInput(
*,
id_: str = get_uuid4_as_str(),
element: Union[
EntityPool,
ForwardRef(
LogicalOperator, module=modules[__name__]
),
]
)
Bases: SBGNRole
Class for inputs of logical operators
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'082b147e-8ec6-4334-ae9b-901b010bf5ea'
|
element
|
EntityPool | ForwardRef('LogicalOperator', module=<module 'momapy.sbgn.pd' from '/home/rougny/code/momapy/src/momapy/sbgn/pd.py'>)
|
|
required |
Macromolecule
dataclass
Macromolecule(
*,
id_: str = get_uuid4_as_str(),
compartment: Compartment | None = None,
label: str | None = None,
state_variables: frozenset[StateVariable] = frozenset(),
units_of_information: frozenset[
UnitOfInformation
] = frozenset()
)
Bases: EntityPool
Class for macromolecules
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'0b38b799-698e-4fb6-8619-5351d845ff72'
|
compartment
|
Compartment | None
|
|
None
|
label
|
str | None
|
|
None
|
MacromoleculeLayout
dataclass
MacromoleculeLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 30.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 60.0,
rounded_corners: float = 5.0
)
Bases: _SimpleMixin, SBGNNode
Class for macromolecule layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'6e8a04cc-a56e-4dab-a2cf-372ee5606533'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
30.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
60.0
|
rounded_corners
|
float
|
|
5.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east
east() -> Point
Return the east anchor of the node
Source code in src/momapy/core.py
719 720 721 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
label_center
label_center() -> Point
Return the label center anchor of the node
Source code in src/momapy/core.py
791 792 793 | |
north
north() -> Point
Return the north anchor of the node
Source code in src/momapy/core.py
691 692 693 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south
south() -> Point
Return the south anchor of the node
Source code in src/momapy/core.py
747 748 749 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west
west() -> Point
Return the west anchor of the node
Source code in src/momapy/core.py
775 776 777 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
MacromoleculeMultimer
dataclass
MacromoleculeMultimer(
*,
id_: str = get_uuid4_as_str(),
compartment: Compartment | None = None,
label: str | None = None,
state_variables: frozenset[StateVariable] = frozenset(),
units_of_information: frozenset[
UnitOfInformation
] = frozenset(),
subunits: frozenset[Subunit] = frozenset(),
cardinality: int | None = None
)
Bases: Multimer
Class for macromolecule multimers
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'ca2aa06a-7f75-4ff0-b179-bad4a446e466'
|
compartment
|
Compartment | None
|
|
None
|
label
|
str | None
|
|
None
|
cardinality
|
int | None
|
|
None
|
MacromoleculeMultimerLayout
dataclass
MacromoleculeMultimerLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
offset: float = 3.0,
subunits_stroke: (
tuple[NoneValueType | Color] | None
) = None,
subunits_stroke_width: (
tuple[NoneValueType | float] | None
) = None,
subunits_stroke_dasharray: (
tuple[NoneValueType | tuple[float]] | None
) = None,
subunits_stroke_dashoffset: tuple[float] | None = None,
subunits_fill: (
tuple[NoneValueType | Color] | None
) = None,
subunits_transform: (
tuple[NoneValueType | tuple[Transformation]] | None
) = None,
subunits_filter: (
tuple[NoneValueType | Filter] | None
) = None,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 30.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 60.0,
rounded_corners: float = 5.0
)
Bases: _MultiMixin, SBGNNode
Class for macromolecule multimer layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'd8ec0c42-f1a6-48af-9a3f-d2a8e5cf8a93'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
30.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
60.0
|
offset
|
float
|
|
3.0
|
subunits_stroke
|
tuple[Union[NoneValueType, Color]] | None
|
|
None
|
subunits_stroke_width
|
tuple[Union[NoneValueType, float]] | None
|
|
None
|
subunits_stroke_dasharray
|
tuple[Union[NoneValueType, tuple[float]]] | None
|
|
None
|
subunits_stroke_dashoffset
|
tuple[float] | None
|
|
None
|
subunits_fill
|
tuple[Union[NoneValueType, Color]] | None
|
|
None
|
subunits_transform
|
tuple[Union[NoneValueType, tuple[Transformation]]] | None
|
|
None
|
subunits_filter
|
tuple[Union[NoneValueType, Filter]] | None
|
|
None
|
rounded_corners
|
float
|
|
5.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east
east() -> Point
Return the east anchor of the node
Source code in src/momapy/core.py
719 720 721 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
north
north() -> Point
Return the north anchor of the node
Source code in src/momapy/core.py
691 692 693 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south
south() -> Point
Return the south anchor of the node
Source code in src/momapy/core.py
747 748 749 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west
west() -> Point
Return the west anchor of the node
Source code in src/momapy/core.py
775 776 777 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
MacromoleculeMultimerSubunit
dataclass
MacromoleculeMultimerSubunit(
*,
id_: str = get_uuid4_as_str(),
label: str | None = None,
state_variables: frozenset[StateVariable] = frozenset(),
units_of_information: frozenset[
UnitOfInformation
] = frozenset(),
subunits: frozenset[Subunit] = frozenset(),
cardinality: int | None = None
)
Bases: MultimerSubunit
Class for macromolecule multimer subunits
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'92b4fa77-e112-4cd3-9b14-fc36a4719003'
|
label
|
str | None
|
|
None
|
cardinality
|
int | None
|
|
None
|
MacromoleculeMultimerSubunitLayout
dataclass
MacromoleculeMultimerSubunitLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
offset: float = 3.0,
subunits_stroke: (
tuple[NoneValueType | Color] | None
) = None,
subunits_stroke_width: (
tuple[NoneValueType | float] | None
) = None,
subunits_stroke_dasharray: (
tuple[NoneValueType | tuple[float]] | None
) = None,
subunits_stroke_dashoffset: tuple[float] | None = None,
subunits_fill: (
tuple[NoneValueType | Color] | None
) = None,
subunits_transform: (
tuple[NoneValueType | tuple[Transformation]] | None
) = None,
subunits_filter: (
tuple[NoneValueType | Filter] | None
) = None,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 30.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 60.0,
rounded_corners: float = 5.0
)
Bases: _MultiMixin, SBGNNode
Class for macromolecule multimer subunit layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'5ffda5f0-6e3d-49b3-927c-a2aae8ec8140'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
30.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
60.0
|
offset
|
float
|
|
3.0
|
subunits_stroke
|
tuple[Union[NoneValueType, Color]] | None
|
|
None
|
subunits_stroke_width
|
tuple[Union[NoneValueType, float]] | None
|
|
None
|
subunits_stroke_dasharray
|
tuple[Union[NoneValueType, tuple[float]]] | None
|
|
None
|
subunits_stroke_dashoffset
|
tuple[float] | None
|
|
None
|
subunits_fill
|
tuple[Union[NoneValueType, Color]] | None
|
|
None
|
subunits_transform
|
tuple[Union[NoneValueType, tuple[Transformation]]] | None
|
|
None
|
subunits_filter
|
tuple[Union[NoneValueType, Filter]] | None
|
|
None
|
rounded_corners
|
float
|
|
5.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east
east() -> Point
Return the east anchor of the node
Source code in src/momapy/core.py
719 720 721 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
north
north() -> Point
Return the north anchor of the node
Source code in src/momapy/core.py
691 692 693 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south
south() -> Point
Return the south anchor of the node
Source code in src/momapy/core.py
747 748 749 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west
west() -> Point
Return the west anchor of the node
Source code in src/momapy/core.py
775 776 777 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
MacromoleculeSubunit
dataclass
MacromoleculeSubunit(
*,
id_: str = get_uuid4_as_str(),
label: str | None = None,
state_variables: frozenset[StateVariable] = frozenset(),
units_of_information: frozenset[
UnitOfInformation
] = frozenset()
)
Bases: Subunit
Class for macromolecule subunits
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'20a95d74-9a38-4d82-b2aa-bfd58ac04508'
|
label
|
str | None
|
|
None
|
MacromoleculeSubunitLayout
dataclass
MacromoleculeSubunitLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 30.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 60.0,
rounded_corners: float = 5.0
)
Bases: _SimpleMixin, SBGNNode
Class for macromolecule subunit layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'0f3b2b3a-6c5e-475e-b1aa-7f46dbb7bd78'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
30.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
60.0
|
rounded_corners
|
float
|
|
5.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east
east() -> Point
Return the east anchor of the node
Source code in src/momapy/core.py
719 720 721 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
label_center
label_center() -> Point
Return the label center anchor of the node
Source code in src/momapy/core.py
791 792 793 | |
north
north() -> Point
Return the north anchor of the node
Source code in src/momapy/core.py
691 692 693 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south
south() -> Point
Return the south anchor of the node
Source code in src/momapy/core.py
747 748 749 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west
west() -> Point
Return the west anchor of the node
Source code in src/momapy/core.py
775 776 777 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
Modulation
dataclass
Modulation(
*,
id_: str = get_uuid4_as_str(),
source: EntityPool | LogicalOperator,
target: Process
)
Bases: SBGNModelElement
Class for modulations
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'de0b96c9-5465-4610-9a90-6c468516ab3f'
|
source
|
EntityPool | LogicalOperator
|
|
required |
target
|
Process
|
|
required |
ModulationLayout
dataclass
ModulationLayout(
path_fill: NoneValueType | Color | None = NoneValue,
path_stroke: NoneValueType | Color | None = black,
path_stroke_width: float | None = 1.25,
arrowhead_stroke: NoneValueType | Color | None = black,
arrowhead_stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
end_shorten: float = 0.0,
fill: NoneValueType | Color | None = None,
filter: NoneValueType | Filter | None = None,
path_filter: NoneValueType | Filter | None = None,
path_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
path_stroke_dashoffset: float | None = None,
path_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
stroke: NoneValueType | Color | None = None,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
stroke_width: float | None = None,
segments: tuple[
Segment | BezierCurve | EllipticalArc
] = tuple(),
source: LayoutElement | None = None,
start_shorten: float = 0.0,
target: LayoutElement | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
arrowhead_fill: NoneValueType | Color | None = white,
arrowhead_filter: NoneValueType | Filter | None = None,
arrowhead_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
arrowhead_stroke_dashoffset: float | None = None,
arrowhead_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
arrowhead_height: float = 10.0,
arrowhead_width: float = 10.0
)
Bases: SBGNSingleHeadedArc
Class for modulation layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'75a6a148-d447-4142-85d6-073bbd9d0def'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
end_shorten
|
float
|
The length the end of the arc will be shorten by |
0.0
|
fill
|
NoneValueType | Color | None
|
The fill color of the arc |
None
|
filter
|
NoneValueType | Filter | None
|
The fill filter of the arc |
None
|
path_fill
|
NoneValueType | Color | None
|
|
<momapy.drawing.NoneValueType object at 0x7f3954141040>
|
path_filter
|
NoneValueType | Filter | None
|
The path filter of the arc |
None
|
path_stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
path_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The path stroke dasharray of the arc |
None
|
path_stroke_dashoffset
|
float | None
|
The path stroke dashoffset of the arc |
None
|
path_stroke_width
|
float | None
|
|
1.25
|
path_transform
|
NoneValueType | tuple[Transformation] | None
|
The path transform of the arc |
None
|
stroke
|
NoneValueType | Color | None
|
The stroke color of the arc |
None
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the arc |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the arc |
None
|
stroke_width
|
float | None
|
The stroke width of the arc |
None
|
segments
|
tuple[Union[Segment, BezierCurve, EllipticalArc]]
|
The path segments of the arc |
<dynamic>
|
source
|
LayoutElement | None
|
The source of the arc |
None
|
start_shorten
|
float
|
The length the start of the arc will be shorten by |
0.0
|
target
|
LayoutElement | None
|
The target of the arc |
None
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the arc |
None
|
arrowhead_fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
arrowhead_filter
|
NoneValueType | Filter | None
|
The arrowhead filter of the arc |
None
|
arrowhead_stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
arrowhead_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The arrowhead stroke dasharray of the arc |
None
|
arrowhead_stroke_dashoffset
|
float | None
|
The arrowhead stroke dashoffset of the arc |
None
|
arrowhead_stroke_width
|
float | None
|
|
1.25
|
arrowhead_transform
|
NoneValueType | tuple[Transformation] | None
|
The arrowhead transform of the arc |
None
|
arrowhead_height
|
float
|
|
10.0
|
arrowhead_width
|
float
|
|
10.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
arrowhead_base |
Return the arrowhead base anchor point of the single-headed arc |
arrowhead_bbox |
Return the bounding box of the single-headed arc arrowhead |
arrowhead_border |
Return the point at the intersection of the drawing elements of the single-headed arc arrowhead and the line going through the center of these drawing elements and the given point. |
arrowhead_drawing_elements |
Return the drawing elements of the single-headed arc arrowhead |
arrowhead_length |
Return the length of the single-headed arc arrowhead |
arrowhead_tip |
Return the arrowhead tip anchor point of the single-headed arc |
bbox |
Compute and return the bounding box of the layout element |
childless |
Return a copy of the arc with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
end_point |
Return the ending point of the arc |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
fraction |
Return the position and angle on the arc at a given fraction (of the total arc length) |
length |
Return the total length of the arc path |
path_drawing_elements |
Return the drawing elements of the single-headed arc path |
points |
Return the points of the arc path |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_children |
Return the self children of the arc |
self_drawing_elements |
Return the self drawing elements of the single-headed arc |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
start_point |
Return the starting point of the arc |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
arrowhead_base
arrowhead_base() -> Point
Return the arrowhead base anchor point of the single-headed arc
Source code in src/momapy/core.py
1089 1090 1091 1092 1093 1094 1095 1096 1097 | |
arrowhead_bbox
arrowhead_bbox() -> Bbox
Return the bounding box of the single-headed arc arrowhead
Source code in src/momapy/core.py
1099 1100 1101 1102 1103 | |
arrowhead_border
arrowhead_border(point) -> Point
Return the point at the intersection of the drawing elements of the single-headed arc arrowhead and the line going through the center of these drawing elements and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 | |
arrowhead_drawing_elements
arrowhead_drawing_elements() -> list[DrawingElement]
Return the drawing elements of the single-headed arc arrowhead
Source code in src/momapy/core.py
1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 | |
arrowhead_length
arrowhead_length() -> float
Return the length of the single-headed arc arrowhead
Source code in src/momapy/core.py
1071 1072 1073 1074 1075 1076 1077 1078 | |
arrowhead_tip
arrowhead_tip() -> Point
Return the arrowhead tip anchor point of the single-headed arc
Source code in src/momapy/core.py
1080 1081 1082 1083 1084 1085 1086 1087 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
childless
childless() -> Self
Return a copy of the arc with no children
Source code in src/momapy/core.py
978 979 980 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
end_point
end_point() -> Point
Return the ending point of the arc
Source code in src/momapy/core.py
974 975 976 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
fraction
fraction(fraction: float) -> tuple[Point, float]
Return the position and angle on the arc at a given fraction (of the total arc length)
Source code in src/momapy/core.py
982 983 984 985 986 987 988 989 990 991 | |
length
length()
Return the total length of the arc path
Source code in src/momapy/core.py
966 967 968 | |
path_drawing_elements
path_drawing_elements() -> list[Path]
Return the drawing elements of the single-headed arc path
Source code in src/momapy/core.py
1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 | |
points
points() -> list[Point]
Return the points of the arc path
Source code in src/momapy/core.py
958 959 960 961 962 963 964 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the arc
Source code in src/momapy/core.py
954 955 956 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the single-headed arc
Source code in src/momapy/core.py
1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
start_point
start_point() -> Point
Return the starting point of the arc
Source code in src/momapy/core.py
970 971 972 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
Multimer
dataclass
Multimer(
*,
id_: str = get_uuid4_as_str(),
compartment: Compartment | None = None,
label: str | None = None,
state_variables: frozenset[StateVariable] = frozenset(),
units_of_information: frozenset[
UnitOfInformation
] = frozenset(),
subunits: frozenset[Subunit] = frozenset(),
cardinality: int | None = None
)
Bases: Complex
Base class for multimers
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'0bd525e6-0b55-4b96-b548-b050e134dd90'
|
compartment
|
Compartment | None
|
|
None
|
label
|
str | None
|
|
None
|
cardinality
|
int | None
|
|
None
|
MultimerSubunit
dataclass
MultimerSubunit(
*,
id_: str = get_uuid4_as_str(),
label: str | None = None,
state_variables: frozenset[StateVariable] = frozenset(),
units_of_information: frozenset[
UnitOfInformation
] = frozenset(),
subunits: frozenset[Subunit] = frozenset(),
cardinality: int | None = None
)
Bases: ComplexSubunit
Base class for multimer subunits
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'8fbd118f-98a0-4049-8bcd-18ae2313e662'
|
label
|
str | None
|
|
None
|
cardinality
|
int | None
|
|
None
|
NecessaryStimulation
dataclass
NecessaryStimulation(
*,
id_: str = get_uuid4_as_str(),
source: EntityPool | LogicalOperator,
target: Process
)
Bases: Stimulation
Class for necessary stimulations
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'e3893a81-05ce-4e47-bbbf-bc4a46f94e73'
|
source
|
EntityPool | LogicalOperator
|
|
required |
target
|
Process
|
|
required |
NecessaryStimulationLayout
dataclass
NecessaryStimulationLayout(
path_fill: NoneValueType | Color | None = NoneValue,
path_stroke: NoneValueType | Color | None = black,
path_stroke_width: float | None = 1.25,
arrowhead_fill: NoneValueType | Color | None = white,
arrowhead_stroke: NoneValueType | Color | None = black,
arrowhead_stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
end_shorten: float = 0.0,
fill: NoneValueType | Color | None = None,
filter: NoneValueType | Filter | None = None,
path_filter: NoneValueType | Filter | None = None,
path_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
path_stroke_dashoffset: float | None = None,
path_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
stroke: NoneValueType | Color | None = None,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
stroke_width: float | None = None,
segments: tuple[
Segment | BezierCurve | EllipticalArc
] = tuple(),
source: LayoutElement | None = None,
start_shorten: float = 0.0,
target: LayoutElement | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
arrowhead_filter: NoneValueType | Filter | None = None,
arrowhead_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
arrowhead_stroke_dashoffset: float | None = None,
arrowhead_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
arrowhead_bar_height: float = 12.0,
arrowhead_sep: float = 3.0,
arrowhead_triangle_height: float = 10.0,
arrowhead_triangle_width: float = 10.0
)
Bases: SBGNSingleHeadedArc
Class for necessary stimulation layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'376c1d5b-054f-4214-9bc5-6da7106220db'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
end_shorten
|
float
|
The length the end of the arc will be shorten by |
0.0
|
fill
|
NoneValueType | Color | None
|
The fill color of the arc |
None
|
filter
|
NoneValueType | Filter | None
|
The fill filter of the arc |
None
|
path_fill
|
NoneValueType | Color | None
|
|
<momapy.drawing.NoneValueType object at 0x7f3954141040>
|
path_filter
|
NoneValueType | Filter | None
|
The path filter of the arc |
None
|
path_stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
path_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The path stroke dasharray of the arc |
None
|
path_stroke_dashoffset
|
float | None
|
The path stroke dashoffset of the arc |
None
|
path_stroke_width
|
float | None
|
|
1.25
|
path_transform
|
NoneValueType | tuple[Transformation] | None
|
The path transform of the arc |
None
|
stroke
|
NoneValueType | Color | None
|
The stroke color of the arc |
None
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the arc |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the arc |
None
|
stroke_width
|
float | None
|
The stroke width of the arc |
None
|
segments
|
tuple[Union[Segment, BezierCurve, EllipticalArc]]
|
The path segments of the arc |
<dynamic>
|
source
|
LayoutElement | None
|
The source of the arc |
None
|
start_shorten
|
float
|
The length the start of the arc will be shorten by |
0.0
|
target
|
LayoutElement | None
|
The target of the arc |
None
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the arc |
None
|
arrowhead_fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
arrowhead_filter
|
NoneValueType | Filter | None
|
The arrowhead filter of the arc |
None
|
arrowhead_stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
arrowhead_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The arrowhead stroke dasharray of the arc |
None
|
arrowhead_stroke_dashoffset
|
float | None
|
The arrowhead stroke dashoffset of the arc |
None
|
arrowhead_stroke_width
|
float | None
|
|
1.25
|
arrowhead_transform
|
NoneValueType | tuple[Transformation] | None
|
The arrowhead transform of the arc |
None
|
arrowhead_bar_height
|
float
|
|
12.0
|
arrowhead_sep
|
float
|
|
3.0
|
arrowhead_triangle_height
|
float
|
|
10.0
|
arrowhead_triangle_width
|
float
|
|
10.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
arrowhead_base |
Return the arrowhead base anchor point of the single-headed arc |
arrowhead_bbox |
Return the bounding box of the single-headed arc arrowhead |
arrowhead_border |
Return the point at the intersection of the drawing elements of the single-headed arc arrowhead and the line going through the center of these drawing elements and the given point. |
arrowhead_drawing_elements |
Return the drawing elements of the single-headed arc arrowhead |
arrowhead_length |
Return the length of the single-headed arc arrowhead |
arrowhead_tip |
Return the arrowhead tip anchor point of the single-headed arc |
bbox |
Compute and return the bounding box of the layout element |
childless |
Return a copy of the arc with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
end_point |
Return the ending point of the arc |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
fraction |
Return the position and angle on the arc at a given fraction (of the total arc length) |
length |
Return the total length of the arc path |
path_drawing_elements |
Return the drawing elements of the single-headed arc path |
points |
Return the points of the arc path |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_children |
Return the self children of the arc |
self_drawing_elements |
Return the self drawing elements of the single-headed arc |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
start_point |
Return the starting point of the arc |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
arrowhead_base
arrowhead_base() -> Point
Return the arrowhead base anchor point of the single-headed arc
Source code in src/momapy/core.py
1089 1090 1091 1092 1093 1094 1095 1096 1097 | |
arrowhead_bbox
arrowhead_bbox() -> Bbox
Return the bounding box of the single-headed arc arrowhead
Source code in src/momapy/core.py
1099 1100 1101 1102 1103 | |
arrowhead_border
arrowhead_border(point) -> Point
Return the point at the intersection of the drawing elements of the single-headed arc arrowhead and the line going through the center of these drawing elements and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 | |
arrowhead_drawing_elements
arrowhead_drawing_elements() -> list[DrawingElement]
Return the drawing elements of the single-headed arc arrowhead
Source code in src/momapy/core.py
1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 | |
arrowhead_length
arrowhead_length() -> float
Return the length of the single-headed arc arrowhead
Source code in src/momapy/core.py
1071 1072 1073 1074 1075 1076 1077 1078 | |
arrowhead_tip
arrowhead_tip() -> Point
Return the arrowhead tip anchor point of the single-headed arc
Source code in src/momapy/core.py
1080 1081 1082 1083 1084 1085 1086 1087 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
childless
childless() -> Self
Return a copy of the arc with no children
Source code in src/momapy/core.py
978 979 980 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
end_point
end_point() -> Point
Return the ending point of the arc
Source code in src/momapy/core.py
974 975 976 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
fraction
fraction(fraction: float) -> tuple[Point, float]
Return the position and angle on the arc at a given fraction (of the total arc length)
Source code in src/momapy/core.py
982 983 984 985 986 987 988 989 990 991 | |
length
length()
Return the total length of the arc path
Source code in src/momapy/core.py
966 967 968 | |
path_drawing_elements
path_drawing_elements() -> list[Path]
Return the drawing elements of the single-headed arc path
Source code in src/momapy/core.py
1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 | |
points
points() -> list[Point]
Return the points of the arc path
Source code in src/momapy/core.py
958 959 960 961 962 963 964 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the arc
Source code in src/momapy/core.py
954 955 956 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the single-headed arc
Source code in src/momapy/core.py
1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
start_point
start_point() -> Point
Return the starting point of the arc
Source code in src/momapy/core.py
970 971 972 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
NotOperator
dataclass
NotOperator(
*,
id_: str = get_uuid4_as_str(),
inputs: frozenset[LogicalOperatorInput] = frozenset()
)
Bases: LogicalOperator
Class for not operators
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'1cdd6c6f-bdb1-4891-a29c-9a8a957f200a'
|
NotOperatorLayout
dataclass
NotOperatorLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 30.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 30.0,
direction: Direction = HORIZONTAL,
left_to_right: bool = True,
left_connector_length: float = 10.0,
right_connector_length: float = 10.0,
left_connector_stroke: (
NoneValueType | Color | None
) = None,
left_connector_stroke_width: float | None = None,
left_connector_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
left_connector_stroke_dashoffset: float | None = None,
left_connector_fill: (
NoneValueType | Color | None
) = None,
left_connector_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
left_connector_filter: (
NoneValueType | Filter | None
) = None,
right_connector_stroke: (
NoneValueType | Color | None
) = None,
right_connector_stroke_width: float | None = None,
right_connector_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
right_connector_stroke_dashoffset: float | None = None,
right_connector_fill: (
NoneValueType | Color | None
) = None,
right_connector_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
right_connector_filter: (
NoneValueType | Filter | None
) = None
)
Bases: _ConnectorsMixin, _SimpleMixin, _TextMixin, SBGNNode
Class for not operator layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'756c38fe-ae12-4c18-b0a5-50c526d61690'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
30.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
30.0
|
direction
|
Direction
|
|
<Direction.HORIZONTAL: 1>
|
left_to_right
|
bool
|
|
True
|
left_connector_length
|
float
|
|
10.0
|
right_connector_length
|
float
|
|
10.0
|
left_connector_stroke
|
NoneValueType | Color | None
|
|
None
|
left_connector_stroke_width
|
float | None
|
|
None
|
left_connector_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
|
None
|
left_connector_stroke_dashoffset
|
float | None
|
|
None
|
left_connector_fill
|
NoneValueType | Color | None
|
|
None
|
left_connector_transform
|
NoneValueType | tuple[Transformation] | None
|
|
None
|
left_connector_filter
|
NoneValueType | Filter | None
|
|
None
|
right_connector_stroke
|
NoneValueType | Color | None
|
|
None
|
right_connector_stroke_width
|
float | None
|
|
None
|
right_connector_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
|
None
|
right_connector_stroke_dashoffset
|
float | None
|
|
None
|
right_connector_fill
|
NoneValueType | Color | None
|
|
None
|
right_connector_transform
|
NoneValueType | tuple[Transformation] | None
|
|
None
|
right_connector_filter
|
NoneValueType | Filter | None
|
|
None
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
label_center
label_center() -> Point
Return the label center anchor of the node
Source code in src/momapy/core.py
791 792 793 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
NucleicAcidFeature
dataclass
NucleicAcidFeature(
*,
id_: str = get_uuid4_as_str(),
compartment: Compartment | None = None,
label: str | None = None,
state_variables: frozenset[StateVariable] = frozenset(),
units_of_information: frozenset[
UnitOfInformation
] = frozenset()
)
Bases: EntityPool
Class for nucleic acid features
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'8066843a-00c9-4087-a5b4-661402c50eea'
|
compartment
|
Compartment | None
|
|
None
|
label
|
str | None
|
|
None
|
NucleicAcidFeatureLayout
dataclass
NucleicAcidFeatureLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 30.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 60.0,
rounded_corners: float = 5.0
)
Bases: _SimpleMixin, SBGNNode
Class for nucleic acid feature layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'9aafad97-027b-4eee-b65c-5b2d3e2cbc58'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
30.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
60.0
|
rounded_corners
|
float
|
|
5.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east
east() -> Point
Return the east anchor of the node
Source code in src/momapy/core.py
719 720 721 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
label_center
label_center() -> Point
Return the label center anchor of the node
Source code in src/momapy/core.py
791 792 793 | |
north
north() -> Point
Return the north anchor of the node
Source code in src/momapy/core.py
691 692 693 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south
south() -> Point
Return the south anchor of the node
Source code in src/momapy/core.py
747 748 749 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west
west() -> Point
Return the west anchor of the node
Source code in src/momapy/core.py
775 776 777 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
NucleicAcidFeatureMultimer
dataclass
NucleicAcidFeatureMultimer(
*,
id_: str = get_uuid4_as_str(),
compartment: Compartment | None = None,
label: str | None = None,
state_variables: frozenset[StateVariable] = frozenset(),
units_of_information: frozenset[
UnitOfInformation
] = frozenset(),
subunits: frozenset[Subunit] = frozenset(),
cardinality: int | None = None
)
Bases: Multimer
Class for nucleic acid feature multimers
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'72a78b2d-7b21-4288-a7b0-f83720bc2ca3'
|
compartment
|
Compartment | None
|
|
None
|
label
|
str | None
|
|
None
|
cardinality
|
int | None
|
|
None
|
NucleicAcidFeatureMultimerLayout
dataclass
NucleicAcidFeatureMultimerLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
offset: float = 3.0,
subunits_stroke: (
tuple[NoneValueType | Color] | None
) = None,
subunits_stroke_width: (
tuple[NoneValueType | float] | None
) = None,
subunits_stroke_dasharray: (
tuple[NoneValueType | tuple[float]] | None
) = None,
subunits_stroke_dashoffset: tuple[float] | None = None,
subunits_fill: (
tuple[NoneValueType | Color] | None
) = None,
subunits_transform: (
tuple[NoneValueType | tuple[Transformation]] | None
) = None,
subunits_filter: (
tuple[NoneValueType | Filter] | None
) = None,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 30.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 60.0,
rounded_corners: float = 5.0
)
Bases: _MultiMixin, SBGNNode
Class for nucleic acid feature multimer layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'aec4d54c-4eda-4b94-af9a-53444b2b814b'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
30.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
60.0
|
offset
|
float
|
|
3.0
|
subunits_stroke
|
tuple[Union[NoneValueType, Color]] | None
|
|
None
|
subunits_stroke_width
|
tuple[Union[NoneValueType, float]] | None
|
|
None
|
subunits_stroke_dasharray
|
tuple[Union[NoneValueType, tuple[float]]] | None
|
|
None
|
subunits_stroke_dashoffset
|
tuple[float] | None
|
|
None
|
subunits_fill
|
tuple[Union[NoneValueType, Color]] | None
|
|
None
|
subunits_transform
|
tuple[Union[NoneValueType, tuple[Transformation]]] | None
|
|
None
|
subunits_filter
|
tuple[Union[NoneValueType, Filter]] | None
|
|
None
|
rounded_corners
|
float
|
|
5.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east
east() -> Point
Return the east anchor of the node
Source code in src/momapy/core.py
719 720 721 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
north
north() -> Point
Return the north anchor of the node
Source code in src/momapy/core.py
691 692 693 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south
south() -> Point
Return the south anchor of the node
Source code in src/momapy/core.py
747 748 749 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west
west() -> Point
Return the west anchor of the node
Source code in src/momapy/core.py
775 776 777 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
NucleicAcidFeatureMultimerSubunit
dataclass
NucleicAcidFeatureMultimerSubunit(
*,
id_: str = get_uuid4_as_str(),
label: str | None = None,
state_variables: frozenset[StateVariable] = frozenset(),
units_of_information: frozenset[
UnitOfInformation
] = frozenset(),
subunits: frozenset[Subunit] = frozenset(),
cardinality: int | None = None
)
Bases: MultimerSubunit
Class for nucleic acid feature multimer subunits
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'bef40879-44a3-4638-a904-053011f3ae0e'
|
label
|
str | None
|
|
None
|
cardinality
|
int | None
|
|
None
|
NucleicAcidFeatureMultimerSubunitLayout
dataclass
NucleicAcidFeatureMultimerSubunitLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
offset: float = 3.0,
subunits_stroke: (
tuple[NoneValueType | Color] | None
) = None,
subunits_stroke_width: (
tuple[NoneValueType | float] | None
) = None,
subunits_stroke_dasharray: (
tuple[NoneValueType | tuple[float]] | None
) = None,
subunits_stroke_dashoffset: tuple[float] | None = None,
subunits_fill: (
tuple[NoneValueType | Color] | None
) = None,
subunits_transform: (
tuple[NoneValueType | tuple[Transformation]] | None
) = None,
subunits_filter: (
tuple[NoneValueType | Filter] | None
) = None,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 30.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 60.0,
rounded_corners: float = 5.0
)
Bases: _MultiMixin, SBGNNode
Class for nucleic acid feature multimer subunit layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'6b4a1dc8-4d8d-468f-8814-7cacf7429b25'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
30.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
60.0
|
offset
|
float
|
|
3.0
|
subunits_stroke
|
tuple[Union[NoneValueType, Color]] | None
|
|
None
|
subunits_stroke_width
|
tuple[Union[NoneValueType, float]] | None
|
|
None
|
subunits_stroke_dasharray
|
tuple[Union[NoneValueType, tuple[float]]] | None
|
|
None
|
subunits_stroke_dashoffset
|
tuple[float] | None
|
|
None
|
subunits_fill
|
tuple[Union[NoneValueType, Color]] | None
|
|
None
|
subunits_transform
|
tuple[Union[NoneValueType, tuple[Transformation]]] | None
|
|
None
|
subunits_filter
|
tuple[Union[NoneValueType, Filter]] | None
|
|
None
|
rounded_corners
|
float
|
|
5.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east
east() -> Point
Return the east anchor of the node
Source code in src/momapy/core.py
719 720 721 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
north
north() -> Point
Return the north anchor of the node
Source code in src/momapy/core.py
691 692 693 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south
south() -> Point
Return the south anchor of the node
Source code in src/momapy/core.py
747 748 749 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west
west() -> Point
Return the west anchor of the node
Source code in src/momapy/core.py
775 776 777 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
NucleicAcidFeatureSubunit
dataclass
NucleicAcidFeatureSubunit(
*,
id_: str = get_uuid4_as_str(),
label: str | None = None,
state_variables: frozenset[StateVariable] = frozenset(),
units_of_information: frozenset[
UnitOfInformation
] = frozenset()
)
Bases: Subunit
Class for nucleic acid feature subunits
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'66fecbc8-7657-4c51-b62c-e93164f6b0ea'
|
label
|
str | None
|
|
None
|
NucleicAcidFeatureSubunitLayout
dataclass
NucleicAcidFeatureSubunitLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 30.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 60.0,
rounded_corners: float = 5.0
)
Bases: _SimpleMixin, SBGNNode
Class for nucleic acid feature subunit layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'56f4cf8a-8d4d-4bba-b5b7-45fc0d25ced3'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
30.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
60.0
|
rounded_corners
|
float
|
|
5.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east
east() -> Point
Return the east anchor of the node
Source code in src/momapy/core.py
719 720 721 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
label_center
label_center() -> Point
Return the label center anchor of the node
Source code in src/momapy/core.py
791 792 793 | |
north
north() -> Point
Return the north anchor of the node
Source code in src/momapy/core.py
691 692 693 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south
south() -> Point
Return the south anchor of the node
Source code in src/momapy/core.py
747 748 749 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west
west() -> Point
Return the west anchor of the node
Source code in src/momapy/core.py
775 776 777 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
OmittedProcess
dataclass
OmittedProcess(
*,
id_: str = get_uuid4_as_str(),
reactants: frozenset[Reactant] = frozenset(),
products: frozenset[Product] = frozenset(),
reversible: bool = False
)
Bases: GenericProcess
Class for omitted processes
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'e087ed07-f724-47e5-ac99-c9be091006cf'
|
reversible
|
bool
|
|
False
|
OmittedProcessLayout
dataclass
OmittedProcessLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 20.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 20.0,
direction: Direction = HORIZONTAL,
left_to_right: bool = True,
left_connector_length: float = 10.0,
right_connector_length: float = 10.0,
left_connector_stroke: (
NoneValueType | Color | None
) = None,
left_connector_stroke_width: float | None = None,
left_connector_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
left_connector_stroke_dashoffset: float | None = None,
left_connector_fill: (
NoneValueType | Color | None
) = None,
left_connector_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
left_connector_filter: (
NoneValueType | Filter | None
) = None,
right_connector_stroke: (
NoneValueType | Color | None
) = None,
right_connector_stroke_width: float | None = None,
right_connector_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
right_connector_stroke_dashoffset: float | None = None,
right_connector_fill: (
NoneValueType | Color | None
) = None,
right_connector_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
right_connector_filter: (
NoneValueType | Filter | None
) = None
)
Bases: _ConnectorsMixin, _SimpleMixin, _TextMixin, SBGNNode
Class for omitted process layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'dc2bd99b-1fcf-4f90-9a2c-923b624edf49'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
20.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
20.0
|
direction
|
Direction
|
|
<Direction.HORIZONTAL: 1>
|
left_to_right
|
bool
|
|
True
|
left_connector_length
|
float
|
|
10.0
|
right_connector_length
|
float
|
|
10.0
|
left_connector_stroke
|
NoneValueType | Color | None
|
|
None
|
left_connector_stroke_width
|
float | None
|
|
None
|
left_connector_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
|
None
|
left_connector_stroke_dashoffset
|
float | None
|
|
None
|
left_connector_fill
|
NoneValueType | Color | None
|
|
None
|
left_connector_transform
|
NoneValueType | tuple[Transformation] | None
|
|
None
|
left_connector_filter
|
NoneValueType | Filter | None
|
|
None
|
right_connector_stroke
|
NoneValueType | Color | None
|
|
None
|
right_connector_stroke_width
|
float | None
|
|
None
|
right_connector_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
|
None
|
right_connector_stroke_dashoffset
|
float | None
|
|
None
|
right_connector_fill
|
NoneValueType | Color | None
|
|
None
|
right_connector_transform
|
NoneValueType | tuple[Transformation] | None
|
|
None
|
right_connector_filter
|
NoneValueType | Filter | None
|
|
None
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
label_center
label_center() -> Point
Return the label center anchor of the node
Source code in src/momapy/core.py
791 792 793 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
OrOperator
dataclass
OrOperator(
*,
id_: str = get_uuid4_as_str(),
inputs: frozenset[LogicalOperatorInput] = frozenset()
)
Bases: LogicalOperator
Class for or operators
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'bcf3e502-739d-4bbb-b1fd-4d06bb268d60'
|
OrOperatorLayout
dataclass
OrOperatorLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 30.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 30.0,
direction: Direction = HORIZONTAL,
left_to_right: bool = True,
left_connector_length: float = 10.0,
right_connector_length: float = 10.0,
left_connector_stroke: (
NoneValueType | Color | None
) = None,
left_connector_stroke_width: float | None = None,
left_connector_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
left_connector_stroke_dashoffset: float | None = None,
left_connector_fill: (
NoneValueType | Color | None
) = None,
left_connector_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
left_connector_filter: (
NoneValueType | Filter | None
) = None,
right_connector_stroke: (
NoneValueType | Color | None
) = None,
right_connector_stroke_width: float | None = None,
right_connector_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
right_connector_stroke_dashoffset: float | None = None,
right_connector_fill: (
NoneValueType | Color | None
) = None,
right_connector_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
right_connector_filter: (
NoneValueType | Filter | None
) = None
)
Bases: _ConnectorsMixin, _SimpleMixin, _TextMixin, SBGNNode
Class for or operator layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'dcb8b9f2-4fea-4068-9325-a33e94d3e241'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
30.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
30.0
|
direction
|
Direction
|
|
<Direction.HORIZONTAL: 1>
|
left_to_right
|
bool
|
|
True
|
left_connector_length
|
float
|
|
10.0
|
right_connector_length
|
float
|
|
10.0
|
left_connector_stroke
|
NoneValueType | Color | None
|
|
None
|
left_connector_stroke_width
|
float | None
|
|
None
|
left_connector_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
|
None
|
left_connector_stroke_dashoffset
|
float | None
|
|
None
|
left_connector_fill
|
NoneValueType | Color | None
|
|
None
|
left_connector_transform
|
NoneValueType | tuple[Transformation] | None
|
|
None
|
left_connector_filter
|
NoneValueType | Filter | None
|
|
None
|
right_connector_stroke
|
NoneValueType | Color | None
|
|
None
|
right_connector_stroke_width
|
float | None
|
|
None
|
right_connector_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
|
None
|
right_connector_stroke_dashoffset
|
float | None
|
|
None
|
right_connector_fill
|
NoneValueType | Color | None
|
|
None
|
right_connector_transform
|
NoneValueType | tuple[Transformation] | None
|
|
None
|
right_connector_filter
|
NoneValueType | Filter | None
|
|
None
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
label_center
label_center() -> Point
Return the label center anchor of the node
Source code in src/momapy/core.py
791 792 793 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
PerturbingAgent
dataclass
PerturbingAgent(
*,
id_: str = get_uuid4_as_str(),
compartment: Compartment | None = None,
label: str | None = None
)
Bases: EntityPool
Class for perturbing agents
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'eaeb3960-d221-41e3-908f-c5bc2888b7a4'
|
compartment
|
Compartment | None
|
|
None
|
label
|
str | None
|
|
None
|
PerturbingAgentLayout
dataclass
PerturbingAgentLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 30.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 60.0,
angle: float = 70.0
)
Bases: _SimpleMixin, SBGNNode
Class for perturbing agent layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'b118e33c-b917-4d3a-97dc-f486f934e23c'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
30.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
60.0
|
angle
|
float
|
|
70.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
angle |
float
|
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
class-attribute
instance-attribute
angle: float = 70.0
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east
east() -> Point
Return the east anchor of the node
Source code in src/momapy/core.py
719 720 721 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
label_center
label_center() -> Point
Return the label center anchor of the node
Source code in src/momapy/core.py
791 792 793 | |
north
north() -> Point
Return the north anchor of the node
Source code in src/momapy/core.py
691 692 693 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south
south() -> Point
Return the south anchor of the node
Source code in src/momapy/core.py
747 748 749 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west
west() -> Point
Return the west anchor of the node
Source code in src/momapy/core.py
775 776 777 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
Phenotype
dataclass
Phenotype(
*,
id_: str = get_uuid4_as_str(),
label: str | None = None
)
Bases: Process
Class for phenotypes
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'dca09d63-b0ae-43ad-a578-37bd9b1ec16b'
|
label
|
str | None
|
|
None
|
PhenotypeLayout
dataclass
PhenotypeLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 30.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 60.0,
angle: float = 70.0
)
Bases: _SimpleMixin, SBGNNode
Class for phenotype layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'bd5c356a-45bc-4da4-8a49-986bbec578fc'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
30.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
60.0
|
angle
|
float
|
|
70.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
angle |
float
|
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
class-attribute
instance-attribute
angle: float = 70.0
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east
east() -> Point
Return the east anchor of the node
Source code in src/momapy/core.py
719 720 721 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
label_center
label_center() -> Point
Return the label center anchor of the node
Source code in src/momapy/core.py
791 792 793 | |
north
north() -> Point
Return the north anchor of the node
Source code in src/momapy/core.py
691 692 693 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south
south() -> Point
Return the south anchor of the node
Source code in src/momapy/core.py
747 748 749 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west
west() -> Point
Return the west anchor of the node
Source code in src/momapy/core.py
775 776 777 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
Process
dataclass
Process(*, id_: str = get_uuid4_as_str())
Bases: SBGNModelElement
Base class for processes
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'ca548e0a-ef94-465d-81ae-2350fbd2cd94'
|
Product
dataclass
Product(
*,
id_: str = get_uuid4_as_str(),
element: EntityPool,
stoichiometry: int | None = None
)
Bases: FluxRole
Class for products
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'73a396f9-339c-4f72-909b-5cf49145aa2c'
|
element
|
EntityPool
|
|
required |
stoichiometry
|
int | None
|
|
None
|
ProductionLayout
dataclass
ProductionLayout(
path_fill: NoneValueType | Color | None = NoneValue,
path_stroke: NoneValueType | Color | None = black,
path_stroke_width: float | None = 1.25,
arrowhead_stroke: NoneValueType | Color | None = black,
arrowhead_stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
end_shorten: float = 0.0,
fill: NoneValueType | Color | None = None,
filter: NoneValueType | Filter | None = None,
path_filter: NoneValueType | Filter | None = None,
path_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
path_stroke_dashoffset: float | None = None,
path_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
stroke: NoneValueType | Color | None = None,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
stroke_width: float | None = None,
segments: tuple[
Segment | BezierCurve | EllipticalArc
] = tuple(),
source: LayoutElement | None = None,
start_shorten: float = 0.0,
target: LayoutElement | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
arrowhead_fill: NoneValueType | Color | None = black,
arrowhead_filter: NoneValueType | Filter | None = None,
arrowhead_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
arrowhead_stroke_dashoffset: float | None = None,
arrowhead_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
arrowhead_height: float = 10.0,
arrowhead_width: float = 10.0
)
Bases: SBGNSingleHeadedArc
Class for production layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'6e4ae224-7ab6-454d-b0f1-037e0c369bc8'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
end_shorten
|
float
|
The length the end of the arc will be shorten by |
0.0
|
fill
|
NoneValueType | Color | None
|
The fill color of the arc |
None
|
filter
|
NoneValueType | Filter | None
|
The fill filter of the arc |
None
|
path_fill
|
NoneValueType | Color | None
|
|
<momapy.drawing.NoneValueType object at 0x7f3954141040>
|
path_filter
|
NoneValueType | Filter | None
|
The path filter of the arc |
None
|
path_stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
path_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The path stroke dasharray of the arc |
None
|
path_stroke_dashoffset
|
float | None
|
The path stroke dashoffset of the arc |
None
|
path_stroke_width
|
float | None
|
|
1.25
|
path_transform
|
NoneValueType | tuple[Transformation] | None
|
The path transform of the arc |
None
|
stroke
|
NoneValueType | Color | None
|
The stroke color of the arc |
None
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the arc |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the arc |
None
|
stroke_width
|
float | None
|
The stroke width of the arc |
None
|
segments
|
tuple[Union[Segment, BezierCurve, EllipticalArc]]
|
The path segments of the arc |
<dynamic>
|
source
|
LayoutElement | None
|
The source of the arc |
None
|
start_shorten
|
float
|
The length the start of the arc will be shorten by |
0.0
|
target
|
LayoutElement | None
|
The target of the arc |
None
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the arc |
None
|
arrowhead_fill
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
arrowhead_filter
|
NoneValueType | Filter | None
|
The arrowhead filter of the arc |
None
|
arrowhead_stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
arrowhead_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The arrowhead stroke dasharray of the arc |
None
|
arrowhead_stroke_dashoffset
|
float | None
|
The arrowhead stroke dashoffset of the arc |
None
|
arrowhead_stroke_width
|
float | None
|
|
1.25
|
arrowhead_transform
|
NoneValueType | tuple[Transformation] | None
|
The arrowhead transform of the arc |
None
|
arrowhead_height
|
float
|
|
10.0
|
arrowhead_width
|
float
|
|
10.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
arrowhead_base |
Return the arrowhead base anchor point of the single-headed arc |
arrowhead_bbox |
Return the bounding box of the single-headed arc arrowhead |
arrowhead_border |
Return the point at the intersection of the drawing elements of the single-headed arc arrowhead and the line going through the center of these drawing elements and the given point. |
arrowhead_drawing_elements |
Return the drawing elements of the single-headed arc arrowhead |
arrowhead_length |
Return the length of the single-headed arc arrowhead |
arrowhead_tip |
Return the arrowhead tip anchor point of the single-headed arc |
bbox |
Compute and return the bounding box of the layout element |
childless |
Return a copy of the arc with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
end_point |
Return the ending point of the arc |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
fraction |
Return the position and angle on the arc at a given fraction (of the total arc length) |
length |
Return the total length of the arc path |
path_drawing_elements |
Return the drawing elements of the single-headed arc path |
points |
Return the points of the arc path |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_children |
Return the self children of the arc |
self_drawing_elements |
Return the self drawing elements of the single-headed arc |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
start_point |
Return the starting point of the arc |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
arrowhead_base
arrowhead_base() -> Point
Return the arrowhead base anchor point of the single-headed arc
Source code in src/momapy/core.py
1089 1090 1091 1092 1093 1094 1095 1096 1097 | |
arrowhead_bbox
arrowhead_bbox() -> Bbox
Return the bounding box of the single-headed arc arrowhead
Source code in src/momapy/core.py
1099 1100 1101 1102 1103 | |
arrowhead_border
arrowhead_border(point) -> Point
Return the point at the intersection of the drawing elements of the single-headed arc arrowhead and the line going through the center of these drawing elements and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 | |
arrowhead_drawing_elements
arrowhead_drawing_elements() -> list[DrawingElement]
Return the drawing elements of the single-headed arc arrowhead
Source code in src/momapy/core.py
1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 | |
arrowhead_length
arrowhead_length() -> float
Return the length of the single-headed arc arrowhead
Source code in src/momapy/core.py
1071 1072 1073 1074 1075 1076 1077 1078 | |
arrowhead_tip
arrowhead_tip() -> Point
Return the arrowhead tip anchor point of the single-headed arc
Source code in src/momapy/core.py
1080 1081 1082 1083 1084 1085 1086 1087 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
childless
childless() -> Self
Return a copy of the arc with no children
Source code in src/momapy/core.py
978 979 980 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
end_point
end_point() -> Point
Return the ending point of the arc
Source code in src/momapy/core.py
974 975 976 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
fraction
fraction(fraction: float) -> tuple[Point, float]
Return the position and angle on the arc at a given fraction (of the total arc length)
Source code in src/momapy/core.py
982 983 984 985 986 987 988 989 990 991 | |
length
length()
Return the total length of the arc path
Source code in src/momapy/core.py
966 967 968 | |
path_drawing_elements
path_drawing_elements() -> list[Path]
Return the drawing elements of the single-headed arc path
Source code in src/momapy/core.py
1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 | |
points
points() -> list[Point]
Return the points of the arc path
Source code in src/momapy/core.py
958 959 960 961 962 963 964 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the arc
Source code in src/momapy/core.py
954 955 956 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the single-headed arc
Source code in src/momapy/core.py
1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
start_point
start_point() -> Point
Return the starting point of the arc
Source code in src/momapy/core.py
970 971 972 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
Reactant
dataclass
Reactant(
*,
id_: str = get_uuid4_as_str(),
element: EntityPool,
stoichiometry: int | None = None
)
Bases: FluxRole
Class for reactants
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'2c6ed4ec-06f9-4ca7-8695-40c5544785ae'
|
element
|
EntityPool
|
|
required |
stoichiometry
|
int | None
|
|
None
|
SBGNPDLayout
dataclass
SBGNPDLayout(
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
fill: NoneValueType | Color | None = white,
filter: NoneValueType | Filter | None = None,
height: float,
label: TextLayout | None = None,
position: Point,
stroke: NoneValueType | Color | None = None,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
stroke_width: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = None
)
Bases: SBGNLayout
Class for SBGN-PD layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'dd7f5ba3-a382-46cc-b8a0-5238f91d63e9'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
The height of the node |
required |
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
The stroke color of the node |
None
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
The stroke width of the node |
None
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
The stroke width of the node |
None
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
is_sublayout |
Return |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east
east() -> Point
Return the east anchor of the node
Source code in src/momapy/core.py
719 720 721 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
is_sublayout
is_sublayout(other, flattened=False, unordered=False)
Return true if another given layout is a sublayout of the layout, false otherwise
Source code in src/momapy/core.py
1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 | |
label_center
label_center() -> Point
Return the label center anchor of the node
Source code in src/momapy/core.py
791 792 793 | |
north
north() -> Point
Return the north anchor of the node
Source code in src/momapy/core.py
691 692 693 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south
south() -> Point
Return the south anchor of the node
Source code in src/momapy/core.py
747 748 749 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west
west() -> Point
Return the west anchor of the node
Source code in src/momapy/core.py
775 776 777 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
SBGNPDLayoutBuilder
module-attribute
SBGNPDLayoutBuilder = get_or_make_builder_cls(SBGNPDLayout)
Class for SBGN-PD layout builders
SBGNPDMap
dataclass
SBGNPDMap(
*,
id_: str = get_uuid4_as_str(),
model: SBGNPDModel,
layout: SBGNPDLayout,
layout_model_mapping: LayoutModelMapping | None = None
)
Bases: SBGNMap
Class for SBGN-PD maps
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'6daf3565-a3f7-4d28-97e4-7f4308f3c069'
|
model
|
SBGNPDModel
|
|
None
|
layout
|
SBGNPDLayout
|
|
None
|
layout_model_mapping
|
LayoutModelMapping | None
|
The layout model mapping of the map |
None
|
Methods:
| Name | Description |
|---|---|
get_mapping |
Return the layout elements mapped to the given model element |
is_submap |
Return |
get_mapping
get_mapping(
key: (
ModelElement | _MappingElementType | _MappingKeyType
),
expand: bool = True,
unpack: bool = False,
)
Return the layout elements mapped to the given model element
Source code in src/momapy/core.py
1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 | |
is_submap
is_submap(other)
Return true if another given map is a submap of the Map, false otherwise
Source code in src/momapy/core.py
1768 1769 1770 1771 1772 1773 1774 1775 1776 | |
SBGNPDMapBuilder
module-attribute
SBGNPDMapBuilder = get_or_make_builder_cls(
SBGNPDMap,
builder_namespace={
"new_model": _sbgnpd_map_builder_new_model,
"new_layout": _sbgnpd_map_builder_new_layout,
},
)
Class for SBGN-PD map builders
SBGNPDModel
dataclass
SBGNPDModel(
*,
id_: str = get_uuid4_as_str(),
entity_pools: frozenset[EntityPool] = frozenset(),
processes: frozenset[Process] = frozenset(),
compartments: frozenset[Compartment] = frozenset(),
modulations: frozenset[Modulation] = frozenset(),
logical_operators: frozenset[
LogicalOperator
] = frozenset(),
equivalence_operators: frozenset[
EquivalenceOperator
] = frozenset(),
submaps: frozenset[Submap] = frozenset(),
tags: frozenset[Tag] = frozenset()
)
Bases: SBGNModel
Class for SBGN-PD models
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'324fe142-8cb0-4186-a2c2-38465c9926c6'
|
Methods:
| Name | Description |
|---|---|
is_ovav |
Return |
is_submodel |
Return |
is_ovav
is_ovav() -> bool
Return true if the SBGN-PD model respects the Once a Variable Always a Variable (OVAV) rule, false otherwise
Source code in src/momapy/sbgn/pd.py
504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 | |
is_submodel
is_submodel(other)
Return true if another given SBGN-PD model is a submodel of the SBGN-PD model, false otherwise
Source code in src/momapy/sbgn/pd.py
553 554 555 556 557 558 559 560 561 562 563 564 565 566 | |
SBGNPDModelBuilder
module-attribute
SBGNPDModelBuilder = get_or_make_builder_cls(SBGNPDModel)
Class for SBGN-PD model builders
SimpleChemical
dataclass
SimpleChemical(
*,
id_: str = get_uuid4_as_str(),
compartment: Compartment | None = None,
label: str | None = None,
state_variables: frozenset[StateVariable] = frozenset(),
units_of_information: frozenset[
UnitOfInformation
] = frozenset()
)
Bases: EntityPool
Class for simple chemical
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'dc37d284-6600-4ca9-930d-55dac4de01e4'
|
compartment
|
Compartment | None
|
|
None
|
label
|
str | None
|
|
None
|
SimpleChemicalLayout
dataclass
SimpleChemicalLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 30.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 30.0
)
Bases: _SimpleMixin, SBGNNode
Class for simple chemical layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'3e281415-3d9c-4b5c-b2e3-11b577e4177f'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
30.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
30.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east
east() -> Point
Return the east anchor of the node
Source code in src/momapy/core.py
719 720 721 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
label_center
label_center() -> Point
Return the label center anchor of the node
Source code in src/momapy/core.py
791 792 793 | |
north
north() -> Point
Return the north anchor of the node
Source code in src/momapy/core.py
691 692 693 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south
south() -> Point
Return the south anchor of the node
Source code in src/momapy/core.py
747 748 749 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west
west() -> Point
Return the west anchor of the node
Source code in src/momapy/core.py
775 776 777 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
SimpleChemicalMultimer
dataclass
SimpleChemicalMultimer(
*,
id_: str = get_uuid4_as_str(),
compartment: Compartment | None = None,
label: str | None = None,
state_variables: frozenset[StateVariable] = frozenset(),
units_of_information: frozenset[
UnitOfInformation
] = frozenset(),
subunits: frozenset[Subunit] = frozenset(),
cardinality: int | None = None
)
Bases: Multimer
Class for simple chemical multimers
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'ce3f4568-f6c3-4de7-8945-e375dd149da9'
|
compartment
|
Compartment | None
|
|
None
|
label
|
str | None
|
|
None
|
cardinality
|
int | None
|
|
None
|
SimpleChemicalMultimerLayout
dataclass
SimpleChemicalMultimerLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
offset: float = 3.0,
subunits_stroke: (
tuple[NoneValueType | Color] | None
) = None,
subunits_stroke_width: (
tuple[NoneValueType | float] | None
) = None,
subunits_stroke_dasharray: (
tuple[NoneValueType | tuple[float]] | None
) = None,
subunits_stroke_dashoffset: tuple[float] | None = None,
subunits_fill: (
tuple[NoneValueType | Color] | None
) = None,
subunits_transform: (
tuple[NoneValueType | tuple[Transformation]] | None
) = None,
subunits_filter: (
tuple[NoneValueType | Filter] | None
) = None,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 30.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 30.0
)
Bases: _MultiMixin, SBGNNode
Class for simple chemical multimer layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'03e5361e-ac83-4fb8-a936-89505055bbff'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
30.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
30.0
|
offset
|
float
|
|
3.0
|
subunits_stroke
|
tuple[Union[NoneValueType, Color]] | None
|
|
None
|
subunits_stroke_width
|
tuple[Union[NoneValueType, float]] | None
|
|
None
|
subunits_stroke_dasharray
|
tuple[Union[NoneValueType, tuple[float]]] | None
|
|
None
|
subunits_stroke_dashoffset
|
tuple[float] | None
|
|
None
|
subunits_fill
|
tuple[Union[NoneValueType, Color]] | None
|
|
None
|
subunits_transform
|
tuple[Union[NoneValueType, tuple[Transformation]]] | None
|
|
None
|
subunits_filter
|
tuple[Union[NoneValueType, Filter]] | None
|
|
None
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east
east() -> Point
Return the east anchor of the node
Source code in src/momapy/core.py
719 720 721 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
north
north() -> Point
Return the north anchor of the node
Source code in src/momapy/core.py
691 692 693 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south
south() -> Point
Return the south anchor of the node
Source code in src/momapy/core.py
747 748 749 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west
west() -> Point
Return the west anchor of the node
Source code in src/momapy/core.py
775 776 777 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
SimpleChemicalMultimerSubunit
dataclass
SimpleChemicalMultimerSubunit(
*,
id_: str = get_uuid4_as_str(),
label: str | None = None,
state_variables: frozenset[StateVariable] = frozenset(),
units_of_information: frozenset[
UnitOfInformation
] = frozenset(),
subunits: frozenset[Subunit] = frozenset(),
cardinality: int | None = None
)
Bases: MultimerSubunit
Class for simple chemical multimer subunits
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'8a8e241d-aeae-4865-bace-9c2e4342ad8c'
|
label
|
str | None
|
|
None
|
cardinality
|
int | None
|
|
None
|
SimpleChemicalMultimerSubunitLayout
dataclass
SimpleChemicalMultimerSubunitLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
offset: float = 3.0,
subunits_stroke: (
tuple[NoneValueType | Color] | None
) = None,
subunits_stroke_width: (
tuple[NoneValueType | float] | None
) = None,
subunits_stroke_dasharray: (
tuple[NoneValueType | tuple[float]] | None
) = None,
subunits_stroke_dashoffset: tuple[float] | None = None,
subunits_fill: (
tuple[NoneValueType | Color] | None
) = None,
subunits_transform: (
tuple[NoneValueType | tuple[Transformation]] | None
) = None,
subunits_filter: (
tuple[NoneValueType | Filter] | None
) = None,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 30.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 60.0
)
Bases: _MultiMixin, SBGNNode
Class for simple chemical multimer subunit layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'21e212cf-5505-4d2f-a3f4-51b3ef25c2e6'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
30.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
60.0
|
offset
|
float
|
|
3.0
|
subunits_stroke
|
tuple[Union[NoneValueType, Color]] | None
|
|
None
|
subunits_stroke_width
|
tuple[Union[NoneValueType, float]] | None
|
|
None
|
subunits_stroke_dasharray
|
tuple[Union[NoneValueType, tuple[float]]] | None
|
|
None
|
subunits_stroke_dashoffset
|
tuple[float] | None
|
|
None
|
subunits_fill
|
tuple[Union[NoneValueType, Color]] | None
|
|
None
|
subunits_transform
|
tuple[Union[NoneValueType, tuple[Transformation]]] | None
|
|
None
|
subunits_filter
|
tuple[Union[NoneValueType, Filter]] | None
|
|
None
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east
east() -> Point
Return the east anchor of the node
Source code in src/momapy/core.py
719 720 721 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
north
north() -> Point
Return the north anchor of the node
Source code in src/momapy/core.py
691 692 693 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south
south() -> Point
Return the south anchor of the node
Source code in src/momapy/core.py
747 748 749 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west
west() -> Point
Return the west anchor of the node
Source code in src/momapy/core.py
775 776 777 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
SimpleChemicalSubunit
dataclass
SimpleChemicalSubunit(
*,
id_: str = get_uuid4_as_str(),
label: str | None = None,
state_variables: frozenset[StateVariable] = frozenset(),
units_of_information: frozenset[
UnitOfInformation
] = frozenset()
)
Bases: Subunit
Class for simple chemical subunits
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'f1c510a9-2a57-4c96-b562-fe7a286efb87'
|
label
|
str | None
|
|
None
|
SimpleChemicalSubunitLayout
dataclass
SimpleChemicalSubunitLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 30.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 30.0
)
Bases: _SimpleMixin, SBGNNode
Class for simple chemical subunit layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'291b4cb6-c41e-4d58-950a-980d80128455'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
30.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
30.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east
east() -> Point
Return the east anchor of the node
Source code in src/momapy/core.py
719 720 721 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
label_center
label_center() -> Point
Return the label center anchor of the node
Source code in src/momapy/core.py
791 792 793 | |
north
north() -> Point
Return the north anchor of the node
Source code in src/momapy/core.py
691 692 693 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south
south() -> Point
Return the south anchor of the node
Source code in src/momapy/core.py
747 748 749 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west
west() -> Point
Return the west anchor of the node
Source code in src/momapy/core.py
775 776 777 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
StateVariable
dataclass
StateVariable(
*,
id_: str = get_uuid4_as_str(),
variable: str | None = None,
value: str | None = None,
order: int | None = None
)
Bases: SBGNAuxiliaryUnit
Class for state variables
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'632b5ec6-3617-4bff-b042-832bb3a2fe21'
|
variable
|
str | None
|
|
None
|
value
|
str | None
|
|
None
|
order
|
int | None
|
|
None
|
StateVariableLayout
dataclass
StateVariableLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 12.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 12.0
)
Bases: _SimpleMixin, SBGNNode
Class for state variable layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'75c7a0d2-6ade-4b34-bc3e-1721c0c5ffd1'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
12.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
12.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east
east() -> Point
Return the east anchor of the node
Source code in src/momapy/core.py
719 720 721 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
label_center
label_center() -> Point
Return the label center anchor of the node
Source code in src/momapy/core.py
791 792 793 | |
north
north() -> Point
Return the north anchor of the node
Source code in src/momapy/core.py
691 692 693 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south
south() -> Point
Return the south anchor of the node
Source code in src/momapy/core.py
747 748 749 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west
west() -> Point
Return the west anchor of the node
Source code in src/momapy/core.py
775 776 777 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
Stimulation
dataclass
Stimulation(
*,
id_: str = get_uuid4_as_str(),
source: EntityPool | LogicalOperator,
target: Process
)
Bases: Modulation
Class for stimulations
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'06355440-f229-43db-bd90-7f06f597ea9a'
|
source
|
EntityPool | LogicalOperator
|
|
required |
target
|
Process
|
|
required |
StimulationLayout
dataclass
StimulationLayout(
path_fill: NoneValueType | Color | None = NoneValue,
path_stroke: NoneValueType | Color | None = black,
path_stroke_width: float | None = 1.25,
arrowhead_fill: NoneValueType | Color | None = white,
arrowhead_stroke: NoneValueType | Color | None = black,
arrowhead_stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
end_shorten: float = 0.0,
fill: NoneValueType | Color | None = None,
filter: NoneValueType | Filter | None = None,
path_filter: NoneValueType | Filter | None = None,
path_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
path_stroke_dashoffset: float | None = None,
path_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
stroke: NoneValueType | Color | None = None,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
stroke_width: float | None = None,
segments: tuple[
Segment | BezierCurve | EllipticalArc
] = tuple(),
source: LayoutElement | None = None,
start_shorten: float = 0.0,
target: LayoutElement | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
arrowhead_filter: NoneValueType | Filter | None = None,
arrowhead_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
arrowhead_stroke_dashoffset: float | None = None,
arrowhead_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
arrowhead_height: float = 10.0,
arrowhead_width: float = 10.0
)
Bases: SBGNSingleHeadedArc
Class for stimulation layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'b9dce6e4-1bde-4ab6-928d-29b9fbcebab6'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
end_shorten
|
float
|
The length the end of the arc will be shorten by |
0.0
|
fill
|
NoneValueType | Color | None
|
The fill color of the arc |
None
|
filter
|
NoneValueType | Filter | None
|
The fill filter of the arc |
None
|
path_fill
|
NoneValueType | Color | None
|
|
<momapy.drawing.NoneValueType object at 0x7f3954141040>
|
path_filter
|
NoneValueType | Filter | None
|
The path filter of the arc |
None
|
path_stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
path_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The path stroke dasharray of the arc |
None
|
path_stroke_dashoffset
|
float | None
|
The path stroke dashoffset of the arc |
None
|
path_stroke_width
|
float | None
|
|
1.25
|
path_transform
|
NoneValueType | tuple[Transformation] | None
|
The path transform of the arc |
None
|
stroke
|
NoneValueType | Color | None
|
The stroke color of the arc |
None
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the arc |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the arc |
None
|
stroke_width
|
float | None
|
The stroke width of the arc |
None
|
segments
|
tuple[Union[Segment, BezierCurve, EllipticalArc]]
|
The path segments of the arc |
<dynamic>
|
source
|
LayoutElement | None
|
The source of the arc |
None
|
start_shorten
|
float
|
The length the start of the arc will be shorten by |
0.0
|
target
|
LayoutElement | None
|
The target of the arc |
None
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the arc |
None
|
arrowhead_fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
arrowhead_filter
|
NoneValueType | Filter | None
|
The arrowhead filter of the arc |
None
|
arrowhead_stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
arrowhead_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The arrowhead stroke dasharray of the arc |
None
|
arrowhead_stroke_dashoffset
|
float | None
|
The arrowhead stroke dashoffset of the arc |
None
|
arrowhead_stroke_width
|
float | None
|
|
1.25
|
arrowhead_transform
|
NoneValueType | tuple[Transformation] | None
|
The arrowhead transform of the arc |
None
|
arrowhead_height
|
float
|
|
10.0
|
arrowhead_width
|
float
|
|
10.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
arrowhead_base |
Return the arrowhead base anchor point of the single-headed arc |
arrowhead_bbox |
Return the bounding box of the single-headed arc arrowhead |
arrowhead_border |
Return the point at the intersection of the drawing elements of the single-headed arc arrowhead and the line going through the center of these drawing elements and the given point. |
arrowhead_drawing_elements |
Return the drawing elements of the single-headed arc arrowhead |
arrowhead_length |
Return the length of the single-headed arc arrowhead |
arrowhead_tip |
Return the arrowhead tip anchor point of the single-headed arc |
bbox |
Compute and return the bounding box of the layout element |
childless |
Return a copy of the arc with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
end_point |
Return the ending point of the arc |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
fraction |
Return the position and angle on the arc at a given fraction (of the total arc length) |
length |
Return the total length of the arc path |
path_drawing_elements |
Return the drawing elements of the single-headed arc path |
points |
Return the points of the arc path |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_children |
Return the self children of the arc |
self_drawing_elements |
Return the self drawing elements of the single-headed arc |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
start_point |
Return the starting point of the arc |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
arrowhead_base
arrowhead_base() -> Point
Return the arrowhead base anchor point of the single-headed arc
Source code in src/momapy/core.py
1089 1090 1091 1092 1093 1094 1095 1096 1097 | |
arrowhead_bbox
arrowhead_bbox() -> Bbox
Return the bounding box of the single-headed arc arrowhead
Source code in src/momapy/core.py
1099 1100 1101 1102 1103 | |
arrowhead_border
arrowhead_border(point) -> Point
Return the point at the intersection of the drawing elements of the single-headed arc arrowhead and the line going through the center of these drawing elements and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 | |
arrowhead_drawing_elements
arrowhead_drawing_elements() -> list[DrawingElement]
Return the drawing elements of the single-headed arc arrowhead
Source code in src/momapy/core.py
1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 | |
arrowhead_length
arrowhead_length() -> float
Return the length of the single-headed arc arrowhead
Source code in src/momapy/core.py
1071 1072 1073 1074 1075 1076 1077 1078 | |
arrowhead_tip
arrowhead_tip() -> Point
Return the arrowhead tip anchor point of the single-headed arc
Source code in src/momapy/core.py
1080 1081 1082 1083 1084 1085 1086 1087 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
childless
childless() -> Self
Return a copy of the arc with no children
Source code in src/momapy/core.py
978 979 980 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
end_point
end_point() -> Point
Return the ending point of the arc
Source code in src/momapy/core.py
974 975 976 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
fraction
fraction(fraction: float) -> tuple[Point, float]
Return the position and angle on the arc at a given fraction (of the total arc length)
Source code in src/momapy/core.py
982 983 984 985 986 987 988 989 990 991 | |
length
length()
Return the total length of the arc path
Source code in src/momapy/core.py
966 967 968 | |
path_drawing_elements
path_drawing_elements() -> list[Path]
Return the drawing elements of the single-headed arc path
Source code in src/momapy/core.py
1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 | |
points
points() -> list[Point]
Return the points of the arc path
Source code in src/momapy/core.py
958 959 960 961 962 963 964 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the arc
Source code in src/momapy/core.py
954 955 956 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the single-headed arc
Source code in src/momapy/core.py
1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
start_point
start_point() -> Point
Return the starting point of the arc
Source code in src/momapy/core.py
970 971 972 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
StoichiometricProcess
dataclass
StoichiometricProcess(
*,
id_: str = get_uuid4_as_str(),
reactants: frozenset[Reactant] = frozenset(),
products: frozenset[Product] = frozenset(),
reversible: bool = False
)
Bases: Process
Base class for stoichiometric processes
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'b051d98f-fade-479c-b6c5-507e0671c70f'
|
reversible
|
bool
|
|
False
|
Submap
dataclass
Submap(
*,
id_: str = get_uuid4_as_str(),
label: str | None = None,
terminals: frozenset[Terminal] = frozenset()
)
Bases: SBGNModelElement
Class for submaps
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'512ced33-e625-4507-8916-cb05ef6f7558'
|
label
|
str | None
|
|
None
|
SubmapLayout
dataclass
SubmapLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 80.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
stroke_width: float = 2.25,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 80.0
)
Bases: _SimpleMixin, SBGNNode
Class for submap layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'150350f5-766e-477d-9edc-d87809e45098'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
80.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float
|
|
2.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
80.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east
east() -> Point
Return the east anchor of the node
Source code in src/momapy/core.py
719 720 721 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
label_center
label_center() -> Point
Return the label center anchor of the node
Source code in src/momapy/core.py
791 792 793 | |
north
north() -> Point
Return the north anchor of the node
Source code in src/momapy/core.py
691 692 693 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south
south() -> Point
Return the south anchor of the node
Source code in src/momapy/core.py
747 748 749 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west
west() -> Point
Return the west anchor of the node
Source code in src/momapy/core.py
775 776 777 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
Subunit
dataclass
Subunit(
*,
id_: str = get_uuid4_as_str(),
label: str | None = None
)
Bases: SBGNAuxiliaryUnit
Base class for subunits
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'e1b51bf3-36f8-4c01-9acc-140a74d0f58b'
|
label
|
str | None
|
|
None
|
Tag
dataclass
Tag(
*,
id_: str = get_uuid4_as_str(),
label: str | None = None,
reference: TagReference | None = None
)
Bases: SBGNModelElement
Class for tags
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'6565fa6f-d2bb-4259-a0eb-17092dbf6974'
|
label
|
str | None
|
|
None
|
reference
|
TagReference | None
|
|
None
|
TagLayout
dataclass
TagLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 35.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 35.0,
direction: Direction = RIGHT,
angle: float = 70.0
)
Bases: _SimpleMixin, SBGNNode
Class for tag layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'8cf899be-4a63-447d-9693-98993f67e034'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
35.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
35.0
|
direction
|
Direction
|
|
<Direction.RIGHT: 4>
|
angle
|
float
|
|
70.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
angle |
float
|
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
class-attribute
instance-attribute
angle: float = 70.0
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east
east() -> Point
Return the east anchor of the node
Source code in src/momapy/core.py
719 720 721 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
label_center
label_center() -> Point
Return the label center anchor of the node
Source code in src/momapy/core.py
791 792 793 | |
north
north() -> Point
Return the north anchor of the node
Source code in src/momapy/core.py
691 692 693 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south
south() -> Point
Return the south anchor of the node
Source code in src/momapy/core.py
747 748 749 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west
west() -> Point
Return the west anchor of the node
Source code in src/momapy/core.py
775 776 777 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
TagReference
dataclass
TagReference(
*,
id_: str = get_uuid4_as_str(),
element: EntityPool | Compartment
)
Bases: SBGNRole
Class for tag references
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'ad3901a3-d865-4474-ad68-9ce61c950c91'
|
element
|
EntityPool | Compartment
|
|
required |
Terminal
dataclass
Terminal(
*,
id_: str = get_uuid4_as_str(),
label: str | None = None,
reference: TerminalReference | None = None
)
Bases: SBGNAuxiliaryUnit
Class for terminals
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'a7c7d16f-5de3-41f0-ae8d-288badaf08fa'
|
label
|
str | None
|
|
None
|
reference
|
TerminalReference | None
|
|
None
|
TerminalLayout
dataclass
TerminalLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 35.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 35.0,
direction: Direction = RIGHT,
angle: float = 70.0
)
Bases: _SimpleMixin, SBGNNode
Class for terminal layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'3577cca9-036b-4791-8b00-572785efdda6'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
35.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
35.0
|
direction
|
Direction
|
|
<Direction.RIGHT: 4>
|
angle
|
float
|
|
70.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
angle |
float
|
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
class-attribute
instance-attribute
angle: float = 70.0
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east
east() -> Point
Return the east anchor of the node
Source code in src/momapy/core.py
719 720 721 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
label_center
label_center() -> Point
Return the label center anchor of the node
Source code in src/momapy/core.py
791 792 793 | |
north
north() -> Point
Return the north anchor of the node
Source code in src/momapy/core.py
691 692 693 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south
south() -> Point
Return the south anchor of the node
Source code in src/momapy/core.py
747 748 749 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west
west() -> Point
Return the west anchor of the node
Source code in src/momapy/core.py
775 776 777 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
TerminalReference
dataclass
TerminalReference(
*,
id_: str = get_uuid4_as_str(),
element: EntityPool | Compartment
)
Bases: SBGNRole
Class for terminal references
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'ec3bf6c6-9333-474b-b6b9-e5d1ca8c08dd'
|
element
|
EntityPool | Compartment
|
|
required |
UncertainProcess
dataclass
UncertainProcess(
*,
id_: str = get_uuid4_as_str(),
reactants: frozenset[Reactant] = frozenset(),
products: frozenset[Product] = frozenset(),
reversible: bool = False
)
Bases: StoichiometricProcess
Class for uncertain processes
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'e32eb439-370f-4d23-a675-3707342480df'
|
reversible
|
bool
|
|
False
|
UncertainProcessLayout
dataclass
UncertainProcessLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 20.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 20.0,
direction: Direction = HORIZONTAL,
left_to_right: bool = True,
left_connector_length: float = 10.0,
right_connector_length: float = 10.0,
left_connector_stroke: (
NoneValueType | Color | None
) = None,
left_connector_stroke_width: float | None = None,
left_connector_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
left_connector_stroke_dashoffset: float | None = None,
left_connector_fill: (
NoneValueType | Color | None
) = None,
left_connector_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
left_connector_filter: (
NoneValueType | Filter | None
) = None,
right_connector_stroke: (
NoneValueType | Color | None
) = None,
right_connector_stroke_width: float | None = None,
right_connector_stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
right_connector_stroke_dashoffset: float | None = None,
right_connector_fill: (
NoneValueType | Color | None
) = None,
right_connector_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
right_connector_filter: (
NoneValueType | Filter | None
) = None
)
Bases: _ConnectorsMixin, _SimpleMixin, _TextMixin, SBGNNode
Class for uncertain process layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'c8090a9e-3a93-44f6-963e-3a826bdef772'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
20.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
20.0
|
direction
|
Direction
|
|
<Direction.HORIZONTAL: 1>
|
left_to_right
|
bool
|
|
True
|
left_connector_length
|
float
|
|
10.0
|
right_connector_length
|
float
|
|
10.0
|
left_connector_stroke
|
NoneValueType | Color | None
|
|
None
|
left_connector_stroke_width
|
float | None
|
|
None
|
left_connector_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
|
None
|
left_connector_stroke_dashoffset
|
float | None
|
|
None
|
left_connector_fill
|
NoneValueType | Color | None
|
|
None
|
left_connector_transform
|
NoneValueType | tuple[Transformation] | None
|
|
None
|
left_connector_filter
|
NoneValueType | Filter | None
|
|
None
|
right_connector_stroke
|
NoneValueType | Color | None
|
|
None
|
right_connector_stroke_width
|
float | None
|
|
None
|
right_connector_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
|
None
|
right_connector_stroke_dashoffset
|
float | None
|
|
None
|
right_connector_fill
|
NoneValueType | Color | None
|
|
None
|
right_connector_transform
|
NoneValueType | tuple[Transformation] | None
|
|
None
|
right_connector_filter
|
NoneValueType | Filter | None
|
|
None
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
label_center
label_center() -> Point
Return the label center anchor of the node
Source code in src/momapy/core.py
791 792 793 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
UnitOfInformation
dataclass
UnitOfInformation(
*,
id_: str = get_uuid4_as_str(),
value: str,
prefix: str | None = None
)
Bases: SBGNAuxiliaryUnit
Class for units of information
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'0cef4ab4-be0c-4244-a601-84a89dac311c'
|
value
|
str
|
|
required |
prefix
|
str | None
|
|
None
|
UnitOfInformationLayout
dataclass
UnitOfInformationLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 12.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 12.0
)
Bases: _SimpleMixin, SBGNNode
Class for unit of information layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'6318b7d1-7886-41a7-8607-f4dd0f115201'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
12.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
12.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east
east() -> Point
Return the east anchor of the node
Source code in src/momapy/core.py
719 720 721 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
label_center
label_center() -> Point
Return the label center anchor of the node
Source code in src/momapy/core.py
791 792 793 | |
north
north() -> Point
Return the north anchor of the node
Source code in src/momapy/core.py
691 692 693 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south
south() -> Point
Return the south anchor of the node
Source code in src/momapy/core.py
747 748 749 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west
west() -> Point
Return the west anchor of the node
Source code in src/momapy/core.py
775 776 777 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
UnspecifiedEntity
dataclass
UnspecifiedEntity(
*,
id_: str = get_uuid4_as_str(),
compartment: Compartment | None = None,
label: str | None = None
)
Bases: EntityPool
Class for unspecified entities
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'9372975d-a7fb-4862-a3ac-1702fe1e7728'
|
compartment
|
Compartment | None
|
|
None
|
label
|
str | None
|
|
None
|
UnspecifiedEntityLayout
dataclass
UnspecifiedEntityLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 30.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 60.0
)
Bases: _SimpleMixin, SBGNNode
Class for unspecified entity layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'261213a8-86b2-49ac-a3b8-72af38f2aba5'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
30.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
60.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east
east() -> Point
Return the east anchor of the node
Source code in src/momapy/core.py
719 720 721 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
label_center
label_center() -> Point
Return the label center anchor of the node
Source code in src/momapy/core.py
791 792 793 | |
north
north() -> Point
Return the north anchor of the node
Source code in src/momapy/core.py
691 692 693 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south
south() -> Point
Return the south anchor of the node
Source code in src/momapy/core.py
747 748 749 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west
west() -> Point
Return the west anchor of the node
Source code in src/momapy/core.py
775 776 777 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node
UnspecifiedEntitySubunit
dataclass
UnspecifiedEntitySubunit(
*,
id_: str = get_uuid4_as_str(),
label: str | None = None
)
Bases: Subunit
Class for unspecified entity subunits
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'3a132216-ff1a-4d74-9f62-3456b17191f2'
|
label
|
str | None
|
|
None
|
UnspecifiedEntitySubunitLayout
dataclass
UnspecifiedEntitySubunitLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = get_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: (
NoneValueType | tuple[Transformation] | None
) = None,
filter: NoneValueType | Filter | None = None,
height: float = 30.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: (
NoneValueType | tuple[float] | None
) = None,
stroke_dashoffset: float | None = None,
transform: (
NoneValueType | tuple[Transformation] | None
) = None,
width: float = 60.0
)
Bases: _SimpleMixin, SBGNNode
Class for unspecified entity subunit layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'430f5f99-fe2e-419b-8a83-93495101e787'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
30.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
60.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the self drawing elements of the node |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name) -> Point
Return an anchor point of the layout element
Source code in src/momapy/core.py
135 136 137 | |
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
830 831 832 833 834 835 836 837 838 839 840 841 | |
bbox
bbox() -> Bbox
Compute and return the bounding box of the layout element
Source code in src/momapy/core.py
73 74 75 76 | |
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
807 808 809 810 811 812 813 814 815 | |
center
center() -> Point
Return the center anchor of the node
Source code in src/momapy/core.py
787 788 789 | |
childless
childless() -> Self
Return a copy of the node with no children
Source code in src/momapy/core.py
843 844 845 | |
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
573 574 575 576 577 | |
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
Source code in src/momapy/core.py
120 121 122 | |
descendants
descendants() -> list[LayoutElement]
Return the descendants of the layout element
Source code in src/momapy/core.py
93 94 95 96 97 98 99 | |
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
east
east() -> Point
Return the east anchor of the node
Source code in src/momapy/core.py
719 720 721 | |
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
711 712 713 714 715 716 717 | |
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
723 724 725 726 727 728 729 | |
equals
equals(other, flattened=False, unordered=False) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
108 109 110 111 112 113 114 115 116 117 118 | |
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
101 102 103 104 105 106 | |
label_center
label_center() -> Point
Return the label center anchor of the node
Source code in src/momapy/core.py
791 792 793 | |
north
north() -> Point
Return the north anchor of the node
Source code in src/momapy/core.py
691 692 693 | |
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
703 704 705 706 707 708 709 | |
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
695 696 697 698 699 700 701 | |
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
683 684 685 686 687 688 689 | |
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
675 676 677 678 679 680 681 | |
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
817 818 819 820 821 822 823 824 825 826 827 828 | |
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
Source code in src/momapy/core.py
530 531 532 533 | |
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
795 796 797 798 799 800 801 802 803 804 805 | |
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
Source code in src/momapy/core.py
665 666 667 668 669 | |
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the node
Source code in src/momapy/core.py
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
self_to_shapely
self_to_shapely() -> GeometryCollection
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
Source code in src/momapy/core.py
524 525 526 527 528 | |
size
size() -> tuple[float, float]
Return the size of the node
Source code in src/momapy/core.py
671 672 673 | |
south
south() -> Point
Return the south anchor of the node
Source code in src/momapy/core.py
747 748 749 | |
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
731 732 733 734 735 736 737 | |
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
739 740 741 742 743 744 745 | |
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
751 752 753 754 755 756 757 | |
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
759 760 761 762 763 764 765 | |
to_shapely
to_shapely(to_polygons: bool = False) -> GeometryCollection
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
124 125 126 127 128 129 130 131 132 133 | |
west
west() -> Point
Return the west anchor of the node
Source code in src/momapy/core.py
775 776 777 | |
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
779 780 781 782 783 784 785 | |
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
767 768 769 770 771 772 773 | |
x
property
x: float
Return the x coordinate of the node
y
property
y: float
Return the y coordinate of the node